mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-25 17:37:49 +02:00
Rename fix-string.js and fixTextForSvg function name to a more readable name.
User regex to detect arabic characters. Fix editing bugs.
This commit is contained in:
@@ -12,6 +12,7 @@ import { uiRawTagEditor } from './raw_tag_editor';
|
||||
import { uiTagReference } from './tag_reference';
|
||||
import { uiPreset } from './preset';
|
||||
import { utilRebind } from '../util/rebind';
|
||||
import { fixArabicScriptTextForSvg } from '../util/svg_paths_arabic_fix';
|
||||
|
||||
|
||||
export function uiEntityEditor(context) {
|
||||
@@ -224,6 +225,14 @@ export function uiEntityEditor(context) {
|
||||
tags[k] = v;
|
||||
}
|
||||
});
|
||||
var arabicRegex = /[\u0600-\u06FF]/g
|
||||
if(tags.highway && tags.real_name){
|
||||
if(arabicRegex.test(tags.real_name)){
|
||||
tags.name = fixArabicScriptTextForSvg(tags.real_name);
|
||||
} else{
|
||||
tags.name = tags.real_name;
|
||||
}
|
||||
}
|
||||
|
||||
if (!onInput) {
|
||||
tags = clean(tags);
|
||||
|
||||
Reference in New Issue
Block a user