Skip to content

Commit

Permalink
Fix an issue with underline being applied after pasting a link
Browse files Browse the repository at this point in the history
  • Loading branch information
volstas committed Oct 30, 2024
1 parent dce418d commit f531620
Show file tree
Hide file tree
Showing 2 changed files with 3 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": "@ernestasthedev/trix",
"version": "1.0.6",
"version": "1.0.8",
"description": "A fork from basecamp/trix, adding controlled initialization and link related improvements",
"module": "dist/trix.esm.min/trix.js",
"style": "dist/trix.css",
Expand Down
3 changes: 2 additions & 1 deletion src/trix/config/text_attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export default {
inheritable: true,
parser(element) {
const style = window.getComputedStyle(element)
return style.textDecoration === "underline"
const link = element.closest("a")
return style.textDecoration === "underline" && !link
},
},
href: {
Expand Down

0 comments on commit f531620

Please sign in to comment.