Fix handling of unicode when counting codeblock lines (#30364)
Release Notes: - N/A
This commit is contained in:
parent
d8980c25d2
commit
857134d6dc
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue