aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextRules.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-12-03 18:50:08 -0500
committerBob Zeleznik <zzzman@gmail.com>2019-12-03 18:50:08 -0500
commitd8b3a6fc2cc6cf15680de82cc512ef5e392bd375 (patch)
tree97586715c91fcef195d6cfb7633ee8cc897b3647 /src/client/util/RichTextRules.ts
parent213962406327cc2f7267064f3016fabf0fd16872 (diff)
fixed text higlighing
Diffstat (limited to 'src/client/util/RichTextRules.ts')
-rw-r--r--src/client/util/RichTextRules.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/util/RichTextRules.ts b/src/client/util/RichTextRules.ts
index bf365579a..cef1011cc 100644
--- a/src/client/util/RichTextRules.ts
+++ b/src/client/util/RichTextRules.ts
@@ -72,28 +72,28 @@ export const inpRules = {
return state.tr.deleteRange(start, end).addStoredMark(schema.marks.pFontSize.create({ fontSize: size }));
}),
new InputRule(
- new RegExp(/t/),
+ new RegExp(/t$/),
(state, match, start, end) => {
if (state.selection.to === state.selection.from) return null;
const node = (state.doc.resolve(start) as any).nodeAfter;
return node ? state.tr.addMark(start, end, schema.marks.user_tag.create({ userid: Doc.CurrentUserEmail, tag: "todo", modified: Math.round(Date.now() / 1000 / 60) })) : state.tr;
}),
new InputRule(
- new RegExp(/i/),
+ new RegExp(/i$/),
(state, match, start, end) => {
if (state.selection.to === state.selection.from) return null;
const node = (state.doc.resolve(start) as any).nodeAfter;
return node ? state.tr.addMark(start, end, schema.marks.user_tag.create({ userid: Doc.CurrentUserEmail, tag: "ignore", modified: Math.round(Date.now() / 1000 / 60) })) : state.tr;
}),
new InputRule(
- new RegExp(/\!/),
+ new RegExp(/!$/),
(state, match, start, end) => {
if (state.selection.to === state.selection.from) return null;
const node = (state.doc.resolve(start) as any).nodeAfter;
return node ? state.tr.addMark(start, end, schema.marks.user_tag.create({ userid: Doc.CurrentUserEmail, tag: "important", modified: Math.round(Date.now() / 1000 / 60) })) : state.tr;
}),
new InputRule(
- new RegExp(/\x/),
+ new RegExp(/x$/),
(state, match, start, end) => {
if (state.selection.to === state.selection.from) return null;
const node = (state.doc.resolve(start) as any).nodeAfter;