Issue with MarkDown filter and HTML...

20 views
Skip to first unread message

jim

unread,
Aug 13, 2021, 3:50:56 PM8/13/21
to Group: okapi-devel
I noticed that the MarkDown fiter doesn't always parse out HTML blocks correctly. For example, in this test each tag is sent as content individually - rather than as a full block.

Instead of "<ul><li>item1</li><li>item2</li></ul>"

Several calls are made to the subfilter (html) like this:

"<ul>"
"<li>"
"item1"
etc..

This makes it impossible for state information to be processed correctly. The tests were probably working before because of a bug in the HTML filter (now fixed).

@Test
public void testUlInTable() throws Exception { // Okapi issue #685
    testRoundTrip("ul-in-table.md");
}

Chase Tingley

unread,
Aug 13, 2021, 5:42:50 PM8/13/21
to okapi...@googlegroups.com

There’s an issue on this already: 

See the discussion about halfway down (Mihai, Kuro, and I) about complexity.

--
You received this message because you are subscribed to the Google Groups "okapi-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to okapi-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/okapi-devel/659b8fdf-f344-8515-d4e6-0496f22548af%40gmail.com.

jim

unread,
Aug 14, 2021, 3:35:15 PM8/14/21
to okapi...@googlegroups.com, Chase Tingley
Ah, I see. This is also related to Kuro's comments in the "Step for inline codes" thread.

For now I will try to work around the exception by tweaking the HTML rule configuration logic. I think this particular case  with "<ul>" is a bug in the AbstractMarkupFilter. "<ul>" is being flagged as an EXCLUDED_ELEMENT tag adn expects to be balanced - but this is incorrect.

thanks,

Jim
Reply all
Reply to author
Forward
0 new messages