The Trans Directory
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(tags): Dont consume a space before content tags (#1706)

authored by

Anton Bulakh and committed by
GitHub
b7a945e0 dc3323b5

+2 -2
+2 -2
quartz/plugins/transformers/ofm.ts
··· 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-Za-z0-9]+)$/g) 132 132 const ytLinkRegex = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/