Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The parser fails to parse marks inside <ul><li> and <row><table><tr><td> if not preceeded by a blank line #597

Open
1 task done
PrometeusGod opened this issue Oct 30, 2023 · 0 comments

Comments

@PrometeusGod
Copy link

PrometeusGod commented Oct 30, 2023

bug description
With a hybrid HTML/MD input The parser fails to parse marks inside

<ul><li> 

and inside

<row><table><tr><td>

Where the bug is located:

  • Parser

Sample code which exhibits the issue.

 Parser parser = Parser.builder().build();
        HtmlRenderer renderer = HtmlRenderer.builder().build();
        String output = """
                <ul><li>**BulletPoint**[link](/url)</li></ul>
                <row gap="tiny"><table><tr><td>**Table** [link](/url) </td></tr> </table></row>
                """;
        Node document = parser.parse(output);
        out.println(renderer.render(document));
  1. Input text used

                 <ul><li>**BulletPoint**[link](/url)</li></ul>
                 <row gap="tiny"><table><tr><td>**Table** [link](/url) </td></tr> </table></row>
    
  2. Options used to configure the parser, renderer, formatter, etc.

No options/default
Parser parser = Parser.builder().build();
HtmlRenderer renderer = HtmlRenderer.builder().build();

Expected behavior

Table link

Resulting Output :

  • **BulletPoint**[link](/url)
**Table** [link](/url)

Note:

Having a blank line right before the mark makes it parsable but adds an unwanted paragraph around the line, which is a problem for multiple bulletpoints and inside tables

<ul><li>
             
**BulletPoint**[link](/url)</li></ul><row gap="tiny"><table><tr><td>**Table**[link](/url)</td></tr></table></row>

Resulting Output :

Tablelink

@PrometeusGod PrometeusGod changed the title The parser fails to parse marks inside <ul><li> and <row><table><tr><td> The parser fails to parse marks inside <ul><li> and <row><table><tr><td> if not preceeded by a blank line Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant