[Bug]: Does not allow editing Column ID with non-English characters
nerkuda opened this issue · 4 comments
Contact Details
What happened?
In the table settings, I added an existing column, for example, "стоимость". The table shows the values of this column. These values can be edited. But if you open the column settings, you cannot change or save the Column ID. Writes: "Error saving ID"
What platform were you using?
Desktop
Version of the plugin
3.5.1
Relevant log output
No response
Are you using the latest version of the plugin in your Obsidian vault?
- I have verified that I am on the latest version
Are you check if there is a similar issue?
- I have verified that there are not similar issues
See src/components/modals/columnSettings/handlers/ColumnIdInputHandler.ts
// Validate special characters in root key
if (rootKey.match(/[^a-zA-Z0-9_]/)) {
return t("column_settings_modal_column_id_error_invalid_key");
}
Chat GPT:
rootKey.match(/[^\w\u0400-\u04FF]/)
In this pattern:
\w
includes word characters (equivalent to [a-zA-Z0-9_]).
\u0400-\u04FF
includes the Unicode range for Cyrillic characters.
So, [^\w\u0400-\u04FF] will match any character that is not a word character (letters, digits, or underscore) and not a Cyrillic character.
@nerkuda Comment some cyrillic ids you'd like me to test
место_покупки
and место_покупки
do work thusfar
Solved in #1023