Fix handling of unicode when counting codeblock lines (#30364)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan authored and GitHub committed 2025-05-09 11:12:54 +00:00
1 parent 86e9bd2566
commit e3c4c5a91c
1 file changed
+2 -2
+2 -2
View File
@@ -80,8 +80,8 @@ pub fn parse_markdown(
content_range.start + range.start..content_range.end + range.start;
let line_count = text[content_range.clone()]
.bytes()
.filter(|c| *c == b'\n')
.chars()
.filter(|c| *c == '\n')
.count();
let metadata = CodeBlockMetadata {
content_range,