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

FlexmarkHtmlConverter convert a html took 11.5 hrs,i donot known why #617

Open
6 tasks
gujincun opened this issue Jul 4, 2024 · 1 comment
Open
6 tasks

Comments

@gujincun
Copy link

gujincun commented Jul 4, 2024

Describe the bug A clear and concise description of what the bug is.

Feel free to remove any sections that do not apply or add your own to clarify your issue.

Please provide as much information about where the bug is located or what you were using:

  • Parser
  • HtmlRenderer
  • Formatter
  • FlexmarkHtmlParser
  • DocxRenderer
  • PdfConverterExtension
  • [ v] extension(s)

To Reproduce

If you can please provide sample code which exhibits the issue. This is always best because it incorporates a testable morsel which includes all relevant information.

Safelist whitelist = Safelist.basic().addTags("h1", "h2", "h3", "h4", "h5", "h6", "table", "tbody", "thead", "th", "tr", "td");
            // 保留的属性
            whitelist.addAttributes("th", "rowspan", "colspan");
            whitelist.addAttributes("td", "rowspan", "colspan");
            whitelist.addAttributes("code", "class");
            html = Jsoup.clean(html, whitelist);
            // 替换空格
            html = html.replaceAll(" "," ");

            MutableDataSet options = new MutableDataSet()
                    .set(FlexmarkHtmlConverter.BR_AS_PARA_BREAKS, false)
                    .set(FlexmarkHtmlConverter.BR_AS_EXTRA_BLANK_LINES, false)
                    .set(FlexmarkHtmlConverter.SETEXT_HEADINGS, false)
                    .set(FlexmarkHtmlConverter.SKIP_CHAR_ESCAPE, true);

            texts = Collections.singletonList(FlexmarkHtmlConverter.builder(options).build().convert(html));

Or a link to a sample code file.

If a code sample is not possible please provide as much of the following information as you can :

  1. Input text used Please provide a sample of text which causes the issue.

    Or provide a link to a file
    54.zip

  2. Options used to configure the parser, renderer, formatter, etc. Please provide concise code when you can.

Expected behavior A clear and concise description of what you expected to happen with sample output that would be desired, where it makes sense.

Resulting Output It is best to provide one of the following (in decreasing order of value):

  • text results,
  • file links,
  • screenshots are least useful but better than nothing.

Additional context Add any other context about the problem here.

@gujincun
Copy link
Author

gujincun commented Jul 4, 2024

html file is in apache-jmeter-5.3.zip\apache-jmeter-5.3\printable_docs,you can get it directliy

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