From 5f24c3f7e23808bff71ecfbc7ecca0c0f823ff4f Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 25 Apr 2023 10:46:09 -0400 Subject: fixed text footnotes to not overflow over the left edge of the box. updated a few markdown command syntaxes. --- src/client/views/nodes/formattedText/RichTextRules.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/client/views/nodes/formattedText/RichTextRules.ts') 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:> - 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 })); -- cgit v1.2.3-70-g09d2