From 62ee0eb2fbfd39a8c9acebbf7f3e83685ffd0101 Mon Sep 17 00:00:00 2001 From: Matthew Chan <> Date: Fri, 29 Sep 2023 14:36:52 -0700 Subject: [PATCH] Import `RangeSet` from `@codemirror/state`. Add `cssclass` to `DEFAULT_NEW_RULE`. --- main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.ts b/main.ts index 1594395..93d3d2e 100644 --- a/main.ts +++ b/main.ts @@ -1,6 +1,6 @@ import { App, Plugin, PluginSettingTab, Setting } from 'obsidian'; import { Decoration, MatchDecorator, ViewPlugin, ViewUpdate } from "@codemirror/view"; -import { RangeSet } from "@codemirror/rangeset"; +import { RangeSet } from "@codemirror/state"; interface LinkifyRule { regexp: string, @@ -40,6 +40,7 @@ const DEFAULT_SETTINGS: LinkifySettings = { const DEFAULT_NEW_RULE = { regexp: "g\\/([a-zA-Z.-]*)", link: "http://google.com/search?q=$1", + cssclass: "", } // Creates a ViewPlugin from a LinkifyRule.