Skip to content

Incorrect location tree building for non-english languages #225

@kyarunts

Description

@kyarunts

I'm writing my screenplay in Armenian, and noticed an issue with the Locations Tree.
Only the first location is displayed on the tree, while the others are ignored.

Image

After doing a little bit of debugging, I figured out, the the issue is in the slugify method.

.replace(/[^\w-]+/g, '') // Remove all non-word chars

The regex used for formatting removes all non-word characters. Unfortunately, the regex is matching only the characters in the range of [a-zA-Z0-9_] and word characters from non-english languages do not fall into this range.

I'm thinking of 3 different possible solutions:

  1. Change the regex to a more inclusive one.
  2. Providing an API to disable this line.
  3. Remove this particular formatting :)

Thanks a lot in advance and thank you for a developing of such a great extension

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions