diff options
| author | bobzel <zzzman@gmail.com> | 2023-04-25 10:46:09 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-04-25 10:46:09 -0400 |
| commit | 5f24c3f7e23808bff71ecfbc7ecca0c0f823ff4f (patch) | |
| tree | af29e879207fd9646bcd1a555e51a04d93cd2b36 /src/client/views/nodes/formattedText/RichTextRules.ts | |
| parent | ec8a635f7fadf7a25b38f0be757ff5ae010bb417 (diff) | |
fixed text footnotes to not overflow over the left edge of the box. updated a few markdown command syntaxes.
Diffstat (limited to 'src/client/views/nodes/formattedText/RichTextRules.ts')
| -rw-r--r-- | src/client/views/nodes/formattedText/RichTextRules.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/formattedText/RichTextRules.ts b/src/client/views/nodes/formattedText/RichTextRules.ts index 0ca6b415f..23e776738 100644 --- a/src/client/views/nodes/formattedText/RichTextRules.ts +++ b/src/client/views/nodes/formattedText/RichTextRules.ts @@ -28,7 +28,7 @@ export class RichTextRules { emDash, // > blockquote - wrappingInputRule(/^\s*>\s$/, schema.nodes.blockquote), + wrappingInputRule(/%>\s$/, schema.nodes.blockquote), // 1. create numerical ordered list wrappingInputRule( @@ -229,7 +229,7 @@ export class RichTextRules { }), // stop using active style - new InputRule(new RegExp(/#alt$/), (state, match, start, end) => { + new InputRule(new RegExp(/%alt$/), (state, match, start, end) => { setTimeout(() => (this.Document[this.TextBox.props.fieldKey + '-usePath'] = this.Document[this.TextBox.props.fieldKey + '-usePath'] ? undefined : 'alternate')); return state.tr.deleteRange(start, end); }), @@ -302,7 +302,7 @@ export class RichTextRules { // create an inline equation node // eq:<equation>> - new InputRule(new RegExp(/:eq([a-zA-Z-0-9\(\)]*)$/), (state, match, start, end) => { + new InputRule(new RegExp(/%eq([a-zA-Z-0-9\(\)]*)$/), (state, match, start, end) => { const fieldKey = 'math' + Utils.GenerateGuid(); this.TextBox.dataDoc[fieldKey] = match[1]; const tr = state.tr.setSelection(new TextSelection(state.tr.doc.resolve(end - 3), state.tr.doc.resolve(end))).replaceSelectionWith(schema.nodes.equation.create({ fieldKey })); |
