diff options
author | bob <bcz@cs.brown.edu> | 2020-01-29 14:18:19 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2020-01-29 14:18:19 -0500 |
commit | 631006eb233e901d8c18bed936b4d160cbbd7cb6 (patch) | |
tree | b63f84ec2c6ae04bfa5388e497316adfaf9d4da5 /src | |
parent | ac9492714eb9264b67d8033d8753fc6ed51b4e29 (diff) |
switched inline sidebars back to ##, made text size setting available anywhere in text with %<num>
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/RichTextRules.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/RichTextRules.ts b/src/client/util/RichTextRules.ts index cdf7831a9..d00921626 100644 --- a/src/client/util/RichTextRules.ts +++ b/src/client/util/RichTextRules.ts @@ -65,7 +65,7 @@ export const inpRules = { // set the font size using #<font-size> new InputRule( - new RegExp(/^%([0-9]+)\s$/), + new RegExp(/%([0-9]+)\s$/), (state, match, start, end) => { const size = Number(match[1]); return state.tr.deleteRange(start, end).addStoredMark(schema.marks.pFontSize.create({ fontSize: size })); @@ -78,7 +78,7 @@ export const inpRules = { const fieldView = state.schema.nodes.dashField.create({ fieldKey: match[1] }); return state.tr.deleteRange(start, end).insert(start, fieldView); }), - // create a text display of a metadata field + // create a text display of a metadata field on another document new InputRule( new RegExp(/\[\[([a-zA-Z_ \-0-9]+):([a-zA-Z_ \-0-9]+)\]\]$/), (state, match, start, end) => { @@ -204,7 +204,7 @@ export const inpRules = { return replaced.setSelection(new TextSelection(replaced.doc.resolve(end - 2))); }), new InputRule( - new RegExp(/%#$/), + new RegExp(/##$/), (state, match, start, end) => { const textDoc = Doc.GetProto(Cast((schema as any).Document[DataSym], Doc, null)!); const numInlines = NumCast(textDoc.inlineTextCount); |