Skip to content

Commit

Permalink
fix: tag match
Browse files Browse the repository at this point in the history
  • Loading branch information
sethyuan committed Aug 16, 2023
1 parent 997855b commit f540c8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "logseq-plugin-tocgen",
"version": "2.11.0",
"version": "2.11.1",
"main": "dist/index.html",
"logseq": {
"id": "_sethyuan-logseq-tocgen",
Expand Down
5 changes: 4 additions & 1 deletion src/libs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export async function parseContent(content) {

if (!logseq.settings?.showTags) {
// Remove tags.
content = content.replace(/(^|\s)#((\[\[([^\]]|\](?!\]))+\]\])|\S+)/g, "")
content = content.replace(
/(^|\s)#(?!#)((\[\[([^\]]|\](?!\]))+\]\])|\S+)/g,
"",
)
}

// Replace block refs with their content.
Expand Down

0 comments on commit f540c8a

Please sign in to comment.