Skip to content

Commit

Permalink
allow 0 or 1 space after > for callout suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
blorbb committed Jan 23, 2024
1 parent f8c53fc commit b9455d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/suggest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ export class CalloutSuggest extends BracketSuggest {
constructor(app: App, plugin: Plugin, csv: string) {
super(app, plugin, {
suggestions: csv.split(",").map((str) => str.trim()),
triggerRegex: /^\s*> \[!(\w*)$/,
// allow 0/1 space before the `[!` - https://github.com/blorbb/obsidian-blockier/issues/5
triggerRegex: /^\s*> ?\[!(\w*)$/,
suggestionClass: "blockier-callout-suggestion",
renderMarkdown: (suggestion) => `> [!${suggestion}]`,
});
Expand Down

0 comments on commit b9455d6

Please sign in to comment.