Skip to content

Commit dbd1c14

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents ffaef34 + f772102 commit dbd1c14

File tree

2 files changed

+79
-2
lines changed

2 files changed

+79
-2
lines changed

flexmark-jira-converter/src/main/java/com/vladsch/flexmark/jira/converter/internal/JiraConverterNodeRenderer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ private void renderListItemPrefix(ListItem node, NodeRendererContext context, Ht
118118
StringBuilder prefix = new StringBuilder();
119119
while (parent instanceof ListBlock || parent instanceof ListItem) {
120120
if (parent instanceof BulletList) {
121-
prefix.append('*');
121+
prefix.insert(0, '*');
122122
} else if (parent instanceof OrderedList) {
123-
prefix.append('#');
123+
prefix.insert(0, '#');
124124
}
125125
parent = parent.getParent();
126126
}

flexmark-jira-converter/src/test/resources/jira_converter_ast_spec.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,83 @@ Document[0, 141]
463463
Text[129, 139] chars:[129, 139, "sub-item 1"]
464464
````````````````````````````````
465465

466+
Mixed nested lists
467+
468+
```````````````````````````````` example Lists: 6
469+
1. item 1
470+
* sub-item 1a
471+
1. sub-sub-item 1a.1
472+
* sub-item 1b
473+
1. sub-sub-item 1b.1
474+
2. item 2
475+
1. sub-item 2.1
476+
477+
* list 2, item a
478+
* list 2, item b
479+
* list 2, item c
480+
1. item c.1
481+
2. item c.2
482+
.
483+
# item 1
484+
#* sub-item 1a
485+
#*# sub-sub-item 1a.1
486+
#* sub-item 1b
487+
#*# sub-sub-item 1b.1
488+
# item 2
489+
## sub-item 2.1
490+
491+
* list 2, item a
492+
* list 2, item b
493+
* list 2, item c
494+
*# item c.1
495+
*# item c.2
496+
497+
.
498+
Document[0, 206]
499+
OrderedList[0, 127] isTight delimiter:'.'
500+
OrderedListItem[0, 98] open:[0, 2, "1."] isTight
501+
Paragraph[3, 10]
502+
Text[3, 9] chars:[3, 9, "item 1"]
503+
BulletList[13, 98] isTight
504+
BulletListItem[13, 54] open:[13, 14, "*"] isTight
505+
Paragraph[15, 27]
506+
Text[15, 26] chars:[15, 26, "sub-i … em 1a"]
507+
OrderedList[33, 54] isTight delimiter:'.'
508+
OrderedListItem[33, 54] open:[33, 35, "1."] isTight
509+
Paragraph[36, 54]
510+
Text[36, 53] chars:[36, 53, "sub-s … 1a.1"]
511+
BulletListItem[57, 98] open:[57, 58, "*"] isTight
512+
Paragraph[59, 71]
513+
Text[59, 70] chars:[59, 70, "sub-i … em 1b"]
514+
OrderedList[77, 98] isTight delimiter:'.'
515+
OrderedListItem[77, 98] open:[77, 79, "1."] isTight
516+
Paragraph[80, 98]
517+
Text[80, 97] chars:[80, 97, "sub-s … 1b.1"]
518+
OrderedListItem[98, 127] open:[98, 100, "2."] isTight
519+
Paragraph[101, 108]
520+
Text[101, 107] chars:[101, 107, "item 2"]
521+
OrderedList[111, 127] isTight delimiter:'.'
522+
OrderedListItem[111, 127] open:[111, 113, "1."] isTight hadBlankLineAfter
523+
Paragraph[114, 127] isTrailingBlankLine
524+
Text[114, 126] chars:[114, 126, "sub-i … m 2.1"]
525+
BulletList[128, 206] isTight
526+
BulletListItem[128, 145] open:[128, 129, "*"] isTight
527+
Paragraph[130, 145]
528+
Text[130, 144] chars:[130, 144, "list … tem a"]
529+
BulletListItem[145, 162] open:[145, 146, "*"] isTight
530+
Paragraph[147, 162]
531+
Text[147, 161] chars:[147, 161, "list … tem b"]
532+
BulletListItem[162, 206] open:[162, 163, "*"] isTight
533+
Paragraph[164, 179]
534+
Text[164, 178] chars:[164, 178, "list … tem c"]
535+
OrderedList[181, 206] isTight delimiter:'.'
536+
OrderedListItem[181, 193] open:[181, 183, "1."] isTight
537+
Paragraph[184, 193]
538+
Text[184, 192] chars:[184, 192, "item c.1"]
539+
OrderedListItem[195, 206] open:[195, 197, "2."] isTight
540+
Paragraph[198, 206]
541+
Text[198, 206] chars:[198, 206, "item c.2"]
542+
````````````````````````````````
466543

467544
## Fenced code
468545

0 commit comments

Comments
 (0)