File tree Expand file tree Collapse file tree 2 files changed +49
-3
lines changed
main/java/skills/services
test/java/skills/services Expand file tree Collapse file tree 2 files changed +49
-3
lines changed Original file line number Diff line number Diff line change @@ -723,9 +723,13 @@ class ParagraphValidator {
723723 invalidate()
724724
725725 if (shouldAddPrefix(node)) {
726- Paragraph paragraph = new Paragraph ()
727- paragraph. prependChild(new Text (request. prefix))
728- node. insertBefore(paragraph)
726+ if (node instanceof Link ) {
727+ addPrefixIfNeeded (node)
728+ } else {
729+ Paragraph paragraph = new Paragraph ()
730+ paragraph. prependChild(new Text (request. prefix))
731+ node. insertBefore(paragraph)
732+ }
729733 }
730734 }
731735 return false
@@ -741,6 +745,8 @@ class ParagraphValidator {
741745 String currentHtml = htmlBlock. getLiteral()
742746 String newHtml = request. prefix + (currentHtml ?: " " )
743747 customReplacements. put(markdownRenderer. render(previousNode), newHtml)
748+ } else if (validRes. closestNode instanceof BulletList ) {
749+ addPrefixIfNeeded(node)
744750 } else {
745751 addPrefixIfNeeded(validRes)
746752 }
Original file line number Diff line number Diff line change @@ -226,6 +226,45 @@ noe more
226226> * three
227227> * four\n """
228228
229+ validator. addPrefixToInvalidParagraphs(""" (A) ok
230+ * item
231+ * item
232+
233+ <span>some text</span>
234+ """ , prefix). newDescription == """ (A) ok
235+
236+ * item
237+ * item
238+
239+ (A) <span>some text</span>
240+ """
241+
242+ validator. addPrefixToInvalidParagraphs(""" (A) ok
243+ * item
244+ * <span>item</span>
245+
246+ <span>some text</span>
247+ """ , prefix). newDescription == """ (A) ok
248+
249+ * item
250+ * <span>item</span>
251+
252+ (A) <span>some text</span>
253+ """
254+
255+ validator. addPrefixToInvalidParagraphs(""" (A) ok
256+ * item
257+ * <span>item</span>
258+
259+ [some text](https://some.url.com)
260+ """ , prefix). newDescription == """ (A) ok
261+
262+ * item
263+ * <span>item</span>
264+
265+ [(A) some text](https://some.url.com)
266+ """
267+
229268 }
230269
231270 def " support markdown tables" () {
693732
694733 then :
695734 validator. addPrefixToInvalidParagraphs(" ${ url} " , prefix). newDescription == " (A) ${ url} \n "
735+ validator. addPrefixToInvalidParagraphs(" [some text](${ url} )" , prefix). newDescription == " [(A) some text](${ url} )\n "
696736 }
697737
698738 def " support html paragraphs" () {
You can’t perform that action at this time.
0 commit comments