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
1237
1237
list_items
1238
1238
}
1239
1239
1240
- DefinitionListLabel = StrChunk :label @Sp @Newline
1240
+ DefinitionListLabel = Inline :label @Sp @Newline
1241
1241
{ label }
1242
1242
1243
1243
DefinitionListDefinition = @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
305
305
assert_equal expected , doc
306
306
end
307
307
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
+
308
327
def test_parse_definition_list_no
309
328
@parser . definition_lists = false
310
329
You can’t perform that action at this time.
0 commit comments