File tree 1 file changed +2
-2
lines changed
quartz/plugins/transformers
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -121,12 +121,12 @@ const commentRegex = new RegExp(/%%[\s\S]*?%%/g)
121
121
// from https://github.com/escwxyz/remark-obsidian-callout/blob/main/src/index.ts
122
122
const calloutRegex = new RegExp ( / ^ \[ \! ( [ \w - ] + ) \| ? ( .+ ?) ? \] ( [ + - ] ? ) / )
123
123
const calloutLineRegex = new RegExp ( / ^ > * \[ \! \w + \| ? .* ?\] [ + - ] ? .* $ / gm)
124
- // (?: ^| ) -> non-capturing group , tag should start be separated by a space or be the start of the line
124
+ // (?<= ^| ) -> a lookbehind assertion , tag should start be separated by a space or be the start of the line
125
125
// #(...) -> capturing group, tag itself must start with #
126
126
// (?:[-_\p{L}\d\p{Z}])+ -> non-capturing group, non-empty string of (Unicode-aware) alpha-numeric characters and symbols, hyphens and/or underscores
127
127
// (?:\/[-_\p{L}\d\p{Z}]+)*) -> non-capturing group, matches an arbitrary number of tag strings separated by "/"
128
128
const tagRegex = new RegExp (
129
- / (?: ^ | ) # ( (?: [ - _ \p{ L} \p{ Emoji} \p{ M} \d ] ) + (?: \/ [ - _ \p{ L} \p{ Emoji} \p{ M} \d ] + ) * ) / gu,
129
+ / (?< = ^ | ) # ( (?: [ - _ \p{ L} \p{ Emoji} \p{ M} \d ] ) + (?: \/ [ - _ \p{ L} \p{ Emoji} \p{ M} \d ] + ) * ) / gu,
130
130
)
131
131
const blockReferenceRegex = new RegExp ( / \^ ( [ - _ A - Z a - z 0 - 9 ] + ) $ / g)
132
132
const ytLinkRegex = / ^ .* ( y o u t u .b e \/ | v \/ | u \/ \w \/ | e m b e d \/ | w a t c h \? v = | \& v = ) ( [ ^ # \& \? ] * ) .* /
You can’t perform that action at this time.
0 commit comments