fix: avoid extra new line when copying
This commit is contained in:
parent
aed6d7782d
commit
55e8c442d1
@ -14,7 +14,7 @@ const Pre = (props) => {
|
||||
}
|
||||
const onCopy = () => {
|
||||
setCopied(true)
|
||||
navigator.clipboard.writeText(textInput.current.innerText)
|
||||
navigator.clipboard.writeText(textInput.current.textContent)
|
||||
setTimeout(() => {
|
||||
setCopied(false)
|
||||
}, 2000)
|
||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -8243,9 +8243,9 @@
|
||||
}
|
||||
},
|
||||
"rehype-prism-plus": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/rehype-prism-plus/-/rehype-prism-plus-0.1.0.tgz",
|
||||
"integrity": "sha512-fiWlSvK0txQnCqqJ4suI/WG/LIqNKXyG8gTujEe1KCX8suITmo6c9wVKd8Q00QrkKL8Q6KdbMWqK0AKz28ICjQ==",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/rehype-prism-plus/-/rehype-prism-plus-1.0.0.tgz",
|
||||
"integrity": "sha512-CCMaW3n40FqBfAnl/hEyQqecRNETDTlWJ6SH6SEQhA8Fy2uJp58gK2VeYO1BOmwrliVckEliOVwt19RikRdV4A==",
|
||||
"requires": {
|
||||
"hast-util-to-html": "^8.0.1",
|
||||
"hast-util-to-string": "^2.0.0",
|
||||
|
@ -29,7 +29,7 @@
|
||||
"reading-time": "1.3.0",
|
||||
"rehype-autolink-headings": "^6.0.0",
|
||||
"rehype-katex": "^6.0.0",
|
||||
"rehype-prism-plus": "^0.1.0",
|
||||
"rehype-prism-plus": "^1.0.0",
|
||||
"rehype-slug": "^5.0.0",
|
||||
"remark-footnotes": "^4.0.0",
|
||||
"remark-gfm": "^2.0.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user