Infinite loop with embeded base64 image
I have a very simple qmd file for testing embeding images:
.figure caption:{Monthly Revenue Performance for 2024}
, I get this:
../quarkdown/bin/quarkdown c r.qmd
Exception in thread "main" java.lang.StackOverflowError
at java.base/java.util.regex.Pattern$CharProperty.match(Pattern.java:4106)
at java.base/java.util.regex.Pattern$Branch.match(Pattern.java:4914)
at java.base/java.util.regex.Pattern$GroupHead.match(Pattern.java:4969)
at java.base/java.util.regex.Pattern$LazyLoop.match(Pattern.java:5146)
at java.base/java.util.regex.Pattern$GroupTail.match(Pattern.java:5000)
at java.base/java.util.regex.Pattern$BranchConn.match(Pattern.java:4878)
at java.base/java.util.regex.Pattern$CharProperty.match(Pattern.java:4110)
at java.base/java.util.regex.Pattern$Branch.match(Pattern.java:4914)
at java.base/java.util.regex.Pattern$GroupHead.match(Pattern.java:4969)
at java.base/java.util.regex.Pattern$LazyLoop.match(Pattern.java:5146)
at java.base/java.util.regex.Pattern$GroupTail.match(Pattern.java:5000)
at java.base/java.util.regex.Pattern$BranchConn.match(Pattern.java:4878)
at java.base/java.util.regex.Pattern$CharProperty.match(Pattern.java:4110)
at java.base/java.util.regex.Pattern$Branch.match(Pattern.java:4914)
......
Probably I can find my way around by just avoid embedding and writing the images to temporary files, but still.
PS Thanks for the great product!
Just to note, if I rename the file to `.md', it is rendered correctly.
This is surprisingly similar to the bug that just got fixed in parsing table headers. That was a regex problem. Yours looks similar.
Agreed, by my knowledge of Kotlin is not good enough to issue a PR :)
Hi @dantodor, I cannot reproduce the issue. Can you provide the full b64 string please?
PS: assigning a title already generates a figure without the need of .figure.
Please note: b64 'support' is purely coincidental, as it just slips to the HTML renderer. It won't work in case of different output targets.
I'm sorry, I deleted the files, and they're generated automatically by an LLM, not easy reproducible. But if you say it won't work when generating PDFs, I'll stop here and go back to simple markdown, as there it's supported and I can generate both PDFs and HTMLs. Thanks for your answer!
@dantodor it will still work when generating PDFs, as PDF generation is built on top of HTML rendering. Just saying, it won't work in case, for example, LaTeX is supported as a rendering target (#41).