@drghaliasri/butex 7.4.0 → 7.4.2
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.
- package/README.md +1 -1
- package/dist/document2.js.map +1 -1
- package/dist/document2.mjs.map +1 -1
- package/dist/index.global.js +24 -9
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +24 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -9
- package/dist/index.mjs.map +1 -1
- package/dist/react-document.js +5 -2
- package/dist/react-document.js.map +1 -1
- package/dist/react-document.mjs +5 -2
- package/dist/react-document.mjs.map +1 -1
- package/dist/react-document2-preview.js.map +1 -1
- package/dist/react-document2-preview.mjs.map +1 -1
- package/dist/react-document2.js +5 -2
- package/dist/react-document2.js.map +1 -1
- package/dist/react-document2.mjs +5 -2
- package/dist/react-document2.mjs.map +1 -1
- package/dist/react.js +5 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +5 -2
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -3754,6 +3754,8 @@ function setCurrentDigitForm(session, digitForm) {
|
|
|
3754
3754
|
return next;
|
|
3755
3755
|
}
|
|
3756
3756
|
function insertChar(session, expr) {
|
|
3757
|
+
const digit = formatDigits(expr, "western");
|
|
3758
|
+
if (/^[0-9]$/.test(digit)) return insertNumber(session, digit);
|
|
3757
3759
|
const base = replaceSelectionFirst(session);
|
|
3758
3760
|
if (!base.splitLeafTyping && !base.forceSplitNextLeaf) {
|
|
3759
3761
|
const next = cloneEditorSession(base);
|
|
@@ -3769,17 +3771,18 @@ function insertChar(session, expr) {
|
|
|
3769
3771
|
return inserted;
|
|
3770
3772
|
}
|
|
3771
3773
|
function insertNumber(session, expr) {
|
|
3774
|
+
const digit = formatDigits(expr, "western");
|
|
3772
3775
|
const base = replaceSelectionFirst(session);
|
|
3773
3776
|
if (!base.splitLeafTyping && !base.forceSplitNextLeaf) {
|
|
3774
3777
|
const next = cloneEditorSession(base);
|
|
3775
|
-
if (tryMergeLeafTyping(next, "number",
|
|
3778
|
+
if (tryMergeLeafTyping(next, "number", digit)) {
|
|
3776
3779
|
next.selectedStructureNodeId = null;
|
|
3777
3780
|
syncSelectionToCaret(next);
|
|
3778
3781
|
appendDebug(next, "mergeLeaf", `number:${expr}`);
|
|
3779
3782
|
return next;
|
|
3780
3783
|
}
|
|
3781
3784
|
}
|
|
3782
|
-
const inserted = insertLeaf(base, "number",
|
|
3785
|
+
const inserted = insertLeaf(base, "number", digit);
|
|
3783
3786
|
inserted.forceSplitNextLeaf = false;
|
|
3784
3787
|
return inserted;
|
|
3785
3788
|
}
|