@talrace/ngx-noder 19.0.57 → 19.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7166,6 +7166,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
7166
7166
|
}] });
|
|
7167
7167
|
|
|
7168
7168
|
class DisplayTokenHelper {
|
|
7169
|
+
static { this.SPACE_NORMALIZER_REGEX = /[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/; }
|
|
7169
7170
|
static getParagraphToken(paragraphSymbolStyle, index) {
|
|
7170
7171
|
const size = FontMetrics.measureCharSize('0', ContentStyleHelper.getFontStylesString(paragraphSymbolStyle));
|
|
7171
7172
|
return new DisplayToken({ ...size, displayValue: DisplayValue.paragraph, index });
|
|
@@ -7178,9 +7179,10 @@ class DisplayTokenHelper {
|
|
|
7178
7179
|
});
|
|
7179
7180
|
}
|
|
7180
7181
|
static getSymbolToken(symbol, fontString, index) {
|
|
7182
|
+
const normalizedSymbol = this.SPACE_NORMALIZER_REGEX.test(symbol) ? ' ' : symbol;
|
|
7181
7183
|
return new DisplayToken({
|
|
7182
|
-
...FontMetrics.measureCharSize(
|
|
7183
|
-
displayValue: this.getSymbolDisplayValue(
|
|
7184
|
+
...FontMetrics.measureCharSize(normalizedSymbol, fontString),
|
|
7185
|
+
displayValue: this.getSymbolDisplayValue(normalizedSymbol),
|
|
7184
7186
|
index
|
|
7185
7187
|
});
|
|
7186
7188
|
}
|