Skip to content

Commit 41652fb

Browse files
committed
Fixed validation of handling ordered lists
1 parent d23df40 commit 41652fb

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

service/src/main/java/skills/services/ParagraphValidator.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ class ParagraphValidator {
707707
}
708708

709709
private static List<Class<? extends Node>> chainableNodeClasses =
710-
[TableBlock.class, Image.class, BulletList.class, IndentedCodeBlock.class, FencedCodeBlock.class]
710+
[TableBlock.class, Image.class, BulletList.class, OrderedList.class, IndentedCodeBlock.class, FencedCodeBlock.class]
711711
private boolean blockHandlerValidator(Node node, int minLinesToPreviousNode = 2, boolean mutateValidationState = true) {
712712
Node previousNode = lookForPreviousParagraph(node)
713713

service/src/test/java/skills/services/CustomValidatorSpec.groovy

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,23 @@ Paragraph three
292292
validator.validateDescription("""1. (A) item 1
293293
1. item 2
294294
""").valid
295+
296+
validator.validateDescription("""## (A) Heading
297+
1. item 1
298+
1. item 2
299+
300+
1. item 1
301+
1. item 2
302+
""").valid
303+
304+
validator.validateDescription("""## (A) Heading
305+
1. item 1
306+
1. item 2
307+
308+
> (A) Blockquote
309+
> Blockquote
310+
""").valid
311+
295312
}
296313

297314
def "support markdown tables"() {

0 commit comments

Comments
 (0)