Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-Latin characters #26

Closed
al3xw opened this issue May 27, 2023 · 2 comments
Closed

Support non-Latin characters #26

al3xw opened this issue May 27, 2023 · 2 comments

Comments

@al3xw
Copy link

al3xw commented May 27, 2023

If a verse is copied/linked from a book with non-Latin characters, the characters before and the non-Latin character are cut off in the naming of the link.

Example:
Input: Matthäus 1.1
Output: [[Matthäus-01#v1|us 1.1]]
Expected Output: [[Matthäus-01#v1|Matthäus 1.1]]

@al3xw
Copy link
Author

al3xw commented May 27, 2023

A sufficient fix is to adjust the following regex in regexes.ts to:

// Can be used to determine whether given name of file is from OBSK (for example Gen-01)
export const isOBSKFile = /([A-zÀ-ž0-9 ]+)-(\d{2,3})/

JavaScript doesn't support unicode character classes (\p{L} doesn't work). But using À-ž seems a good workaround.

@kuchejak
Copy link
Owner

kuchejak commented Jun 3, 2023

Should be fixed now (version 1.4.5)

@kuchejak kuchejak closed this as completed Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants