Skip to content

Commit d27a2bd

Browse files
committed
Fix raw status ending in the HTML tokenizer
This fixes a small mistake where the "raw" status wasn't being reset once exiting the script or style tags. That means any text nodes that followed would be misinterpreted as being raw.
1 parent cd3e26f commit d27a2bd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

crates/mdbook-html/src/html/tree.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ where
614614
}
615615
}
616616
TagKind::EndTag => {
617+
is_raw = false;
617618
if self.is_html_tag_matching(&tag.name) {
618619
self.pop();
619620
}

tests/testsuite/rendering/html_blocks/expected/script-in-block.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<script>
44
// script stuff <here>
55
</script>
6-
< still in block
6+
&lt; still in block
77
</div>

0 commit comments

Comments
 (0)