Skip to content

Commit

Permalink
Import RangeSet from @codemirror/state.
Browse files Browse the repository at this point in the history
Add `cssclass` to `DEFAULT_NEW_RULE`.
  • Loading branch information
Matthew Chan committed Sep 29, 2023
1 parent 6f31406 commit 62ee0eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 62ee0eb

Please sign in to comment.