Skip to content

Commit

Permalink
Add comment about the graphemes business
Browse files Browse the repository at this point in the history
Co-authored-by: Max Horn <[email protected]>
  • Loading branch information
aaruni96 and fingolfin committed Feb 8, 2024
1 parent 0530ed8 commit f985a0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PrettyPrinting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,8 @@ function _write_line(io::IOCustom, str::AbstractString)
spaceleft = c - ind - io.printed
end
#@show spaceleft
# The following code deals with line wrapping of Unicode text, including
# double-width symbols and more.
_graphemes = Base.Unicode.graphemes(str)
firstlen = min(spaceleft, length(_graphemes))
# make an iterator over valid indices
Expand Down

0 comments on commit f985a0f

Please sign in to comment.