Skip to content

Commit

Permalink
[Markdown] use textwidth to compute string width (#47761)
Browse files Browse the repository at this point in the history
  • Loading branch information
ronisbr committed Dec 20, 2022
1 parent 4341b96 commit a3ba757
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/Markdown/src/render/terminal/formatting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Wrapping

function ansi_length(s)
replace(s, r"\e\[[0-9]+m" => "") |> length
replace(s, r"\e\[[0-9]+m" => "") |> textwidth
end

words(s) = split(s, " ")
Expand Down

0 comments on commit a3ba757

Please sign in to comment.