Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDD: Block style #124

Merged
merged 7 commits into from
Sep 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions src/tests/asciidoc_lang/blocks/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,31 +149,29 @@ mod context {
// Content of section.
// ----
//
// The context of this block is `section`.
// The context of this block is `section`. We often refer to this as a section
// (or section block), using the context as an adjective to describe the block.
// The writer does not have to specify the context in this case since it's
// implied by the syntax.
//
// Every block has a context. The context is often implied by the syntax, but
// can be declared explicitly in certain cases. The context is what
// distinguishes one kind of block from another. You can think of the context as
// the block's type.

let pr = Block::parse(Span::new("== Section Title\n\nContent of section.")).unwrap();

assert_eq!(pr.t.context().deref(), "section");
}

// We often refer to this as a section (or section block), using the context
// as an adjective to describe the block. The writer does not have to
// specify the context in this case since it's implied by the syntax.
//
// Every block has a context.
// The context is often implied by the syntax, but can be declared
// explicitly in certain cases. The context is what distinguishes one
// kind of block from another. You can think of the context as the
// block's type.

#[test]
#[ignore]
fn block_style() {
// The context can be further modified using a block style to create a
// family of blocks that share a common type, as is the case with
// admonition blocks and sections. We'll cover that modifier shortly.

todo!("I don't understand block style yet. Will add test later.");
todo!("Redundant: Covered by block_style test below.");
}

#[test]
Expand Down Expand Up @@ -356,9 +354,7 @@ mod context {
}
}

#[test]
#[ignore]
fn block_style() {
mod block_style {
// [#block-style]
// == Block style
//
Expand Down
Loading