Skip to content

Commit

Permalink
Use lookbehind assertion on Tag regex
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
cesardeazevedo committed Oct 29, 2024
1 parent 2f08030 commit 48be08b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extensions/TagExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export interface TagAttributes {
tag: string
}

const REGEX_TAG_PASTE = /(#[^\W]+)/g
const REGEX_TAG_INPUT = /(#[^\W]+)$/g
const REGEX_TAG_PASTE = /(?<![\w./:?=])(#[^\W]+)/g
const REGEX_TAG_INPUT = /(?<![\w./:?=])(#[^\W]+)$/g

export const TagExtension = Mark.create({
name: 'tag',
Expand Down

0 comments on commit 48be08b

Please sign in to comment.