File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -1237,7 +1237,7 @@ DefinitionListItem = ( DefinitionListLabel+ ):label
12371237 list_items
12381238 }
12391239
1240- DefinitionListLabel = StrChunk :label @Sp @Newline
1240+ DefinitionListLabel = Inline :label @Sp @Newline
12411241 { label }
12421242
12431243DefinitionListDefinition = @NonindentSpace ":" @Space Inlines:a @BlankLine+
Original file line number Diff line number Diff line change @@ -305,6 +305,25 @@ def test_parse_definition_list_multi_line
305305 assert_equal expected , doc
306306 end
307307
308+ def test_parse_definition_list_rich_label
309+ doc = parse <<-MD
310+ `one`
311+ : This is a definition
312+
313+ **two**
314+ : This is another definition
315+ MD
316+
317+ expected = doc (
318+ list ( :NOTE ,
319+ item ( %w[ <code>one</code> ] ,
320+ para ( "This is a definition" ) ) ,
321+ item ( %w[ *two* ] ,
322+ para ( "This is another definition" ) ) ) )
323+
324+ assert_equal expected , doc
325+ end
326+
308327 def test_parse_definition_list_no
309328 @parser . definition_lists = false
310329
You can’t perform that action at this time.
0 commit comments