Open GabeIsman opened 3 months ago
Thanks for the report! This is definitely a Comrak thing. No guarantees on when I'll be able to look into this, but it shoooooould be fairly simple. 🤞
@kivikakk it looks like this is occurring for the tags <script>
, <pre>
, <textarea>
, and <style>
. They get recognized in html_block_start
, https://github.com/kivikakk/comrak/blob/42f45948c1de9cbd8ff5c70de4f923bbc47dac41/src/scanners.re#L152 and returns a 1
, and then https://github.com/kivikakk/comrak/blob/feaf5cffd19435e554535705dbdcea5bf8fd7884/src/parser/mod.rs#L1928-L1938 handles it.
I'm not sure why these would get treated differently than any other HTML block tag, such as a <p>
?
Of course, I should've looked at the spec 🤦
I've encountered an odd issue. I'm using the Ruby wrapper (Commonmarker) and inspecting the AST shows some strange behavior around the
sourcepos
of<script>
tags. AFAICT this is only related to script tags, and only ones that appear all on one line at that.note the
end_line
andend_column
are both zero. In general I've observed thatend_line
isstart_line - 1
, andend_column
is always zero.Let me know if I should open an issue on Commonmarker instead, but I don't see how this could be caused by the wrapper. I just lack the rust expertise to test it directly in rust, sorry!