Skip to content

Bug fix and performance improvement for attribute_per_char #5480

@hz-xiaxz

Description

@hz-xiaxz

There is logic bug and potential performance improvement text_layouting.jl.

char == "\n" && (i += 1)

char is of type Char, and is never == a string-typed "\n", so this line should have not been working for 6 years!
This really should be '\n'

Also, comparing with '\n' is weird as you split the string by \s+ earlier. So I would submit a PR, substituting this map! approach to manual for loop to solve the boxed issue, and correct the behaviour.

  • [x ] what version of Makie are you running? (]st -m Makie)
    0.24.8
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)
  • What platform + GPU are you on?
  • Which backend are you using? (GLMakie, CairoMakie, WGLMakie, RPRMakie)
  • Please provide an minimal example of the failing code. If the problem is with the visualization, please provide a picture or video of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions