Skip to content

Commit

Permalink
Fix for tag pane HTML changes in Obsidian 1.2 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeby committed Mar 30, 2023
1 parent d7a8e9d commit fe64b8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 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.7",
"version": "0.5.8",
"minAppVersion": "0.15.9",
"description": "Rename, merge, toggle, and search tags from the tag pane",
"isDesktopOnly": false
Expand Down
6 changes: 3 additions & 3 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class TagWrangler extends Plugin {
// Tags in the tag pane
new TagPageUIHandler(this, {
hoverSource: tagHoverMain, selector: ".tag-pane-tag", container: ".tag-container",
toTag(el) { return el.find(".tag-pane-tag-text")?.textContent; }
toTag(el) { return el.find(".tag-pane-tag-text, tag-pane-tag-text, .tag-pane-tag .tree-item-inner-text")?.textContent; }
})
);

Expand Down Expand Up @@ -90,7 +90,7 @@ export default class TagWrangler extends Plugin {
);
this.register(
onElement(document, "dragstart", ".tag-pane-tag", (event, targetEl) => {
const tagName = targetEl.find(".tag-pane-tag-text")?.textContent;
const tagName = targetEl.find(".tag-pane-tag-text, tag-pane-tag-text, .tag-pane-tag .tree-item-inner-text")?.textContent;
event.dataTransfer.setData("text/plain", "#"+tagName);
app.dragManager.onDragStart(event, {
source: "tag-wrangler",
Expand Down Expand Up @@ -167,7 +167,7 @@ export default class TagWrangler extends Plugin {
}

const
tagName = tagEl.find(".tag-pane-tag-text").textContent,
tagName = tagEl.find(".tag-pane-tag-text, .tag-pane-tag .tree-item-inner-text").textContent,
tagPage = this.tagPage(tagName),
isHierarchy = tagEl.parentElement.parentElement.find(".collapse-icon"),
searchPlugin = this.app.internalPlugins.getPluginById("global-search"),
Expand Down
2 changes: 1 addition & 1 deletion versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"0.5.7": "0.15.9",
"0.5.8": "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 fe64b8a

Please sign in to comment.