-
Notifications
You must be signed in to change notification settings - Fork 345
Asciidoctor: Handle snippets in definition lists #680
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
Changes from 1 commit
bd32de2
6ff1d7d
d410a5c
40ed756
3ac0589
0ed1da8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,4 +96,20 @@ | |
expect(actual).to eq(expected.strip) | ||
end | ||
end | ||
|
||
it "doesn't mind when the snippet inside a definition list" do | ||
actual = convert <<~ASCIIDOC | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I mentioned this in the last PR I reviewed, maybe eventually you can use This is an example of how context blocks and let blocks can be used. |
||
== Example | ||
Term:: | ||
Definition | ||
+ | ||
-- | ||
[source,js] | ||
---- | ||
GET / | ||
---- | ||
-- | ||
ASCIIDOC | ||
expect(actual).to match(%r{<programlisting language="js" linenumbering="unnumbered">GET /</programlisting>}) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it would be more idiomatic to write
return unless next_block_index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I wrote it I felt like "This can only be nil or a string so I should be explicit" but I've come around to your way.