File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
main/java/skills/services
test/java/skills/services Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ class CustomValidator {
8282 private static final Pattern TABLE_FIX = ~/ (?m)(^\n )(^[|].+[|]$\n ^[|].*[-]{3,}.*[|]$)/
8383 private static final Pattern CODEBLOCK_FIX = ~/ (?m)(^\n )(^[`]{3}$)/
8484 private static final Pattern LIST_FIX = ~/ (?m)(^\n )(\s *\d\. |\* |- .*$)/
85+ private static final Pattern HEADING_FIX = ~/ (?m)([(].+[)].*$)\n (\n .*$)/
8586
8687 @PostConstruct
8788 CustomValidator init () {
@@ -249,6 +250,7 @@ class CustomValidator {
249250 toValidate = TABLE_FIX . matcher(toValidate). replaceAll(' $2' )
250251 toValidate = CODEBLOCK_FIX . matcher(toValidate). replaceAll(' $2' )
251252 toValidate = LIST_FIX . matcher(toValidate). replaceAll(' $2' )
253+ toValidate = HEADING_FIX . matcher(toValidate). replaceAll(' $1$2' )
252254
253255 // remove two+ newlines from codeblocks so we do not split
254256 StringBuilder out = new StringBuilder ()
You can’t perform that action at this time.
0 commit comments