Skip to content

Commit

Permalink
Fix #66 - Support tag pages on the same line
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeby committed Dec 31, 2022
1 parent 6637617 commit 1b537bb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Tag Wrangler",
"author": "PJ Eby",
"authorUrl": "https://github.com/pjeby",
"version": "0.5.5",
"version": "0.5.6",
"minAppVersion": "0.15.9",
"description": "Rename, merge, toggle, and search tags from the tag pane",
"isDesktopOnly": false
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ export default class TagWrangler extends Plugin {
toTag(el) {
// Multiple cm-hashtag elements can be side by side: join them all together:
let tagName = el.textContent;
for (let t=el.previousElementSibling; t?.matches("span.cm-hashtag"); t = t.previousElementSibling) {
if (!el.matches(".cm-formatting")) for (let t=el.previousElementSibling; t?.matches("span.cm-hashtag:not(.cm-formatting)"); t = t.previousElementSibling) {
tagName = t.textContent + tagName;
}
for (let t=el.nextElementSibling; t?.matches("span.cm-hashtag"); t = t.nextElementSibling) {
for (let t=el.nextElementSibling; t?.matches("span.cm-hashtag:not(.cm-formatting)"); t = t.nextElementSibling) {
tagName += t.textContent;
}
return tagName;
Expand Down
1 change: 1 addition & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"0.5.6": "0.15.9",
"0.5.5": "0.15.9",
"0.5.3": "0.14.5",
"0.5.2": "0.13.19",
Expand Down

0 comments on commit 1b537bb

Please sign in to comment.