Skip to content

Commit

Permalink
4.1.3
Browse files Browse the repository at this point in the history
- Whitespace is trimmed from content when copied to clipboard
- Updated CSS selector to remove deprecated `::-webkit-details-marker`
  • Loading branch information
valentine195 committed May 11, 2021
1 parent 3e32b14 commit b744e6d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-admonition",
"name": "Admonition",
"version": "4.1.2",
"version": "4.1.3",
"minAppVersion": "0.11.0",
"description": "Admonition block-styled content for Obsidian.md",
"author": "Jeremy Valentine",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-admonition",
"version": "4.1.2",
"version": "4.1.3",
"description": "Admonition block-styled content for Obsidian.md",
"main": "main.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ details.admonition > summary {
cursor: pointer;
}

details.admonition > summary::-webkit-details-marker {
display: none;
details.admonition > summary {
list-style-type: none;
}

details.admonition > summary > .collapser {
Expand Down
10 changes: 7 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,13 @@ export default class ObsidianAdmonition
).node[0]
);
copy.addEventListener("click", () => {
navigator.clipboard.writeText(content).then(() => {
new Notice("Admonition content copied to clipboard.");
});
navigator.clipboard
.writeText(content.trim())
.then(async () => {
new Notice(
"Admonition content copied to clipboard."
);
});
});
}

Expand Down
2 changes: 1 addition & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"3.2.2": "0.11.0",
"3.3.4": "0.11.0",
"4.0.1": "0.11.0",
"4.1.2": "0.11.0"
"4.1.3": "0.11.0"
}

0 comments on commit b744e6d

Please sign in to comment.