Break long words in CodeMirror (#2044)

* Break long words in CodeMirror

Credit to Marko Letic: https://stackoverflow.com/a/57377527

* Move rule to more general CodeMirror component
This commit is contained in:
Matthias Metelka 2022-09-01 15:30:17 +02:00 committed by GitHub
parent 52b4e3ad16
commit 53293284c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -88,7 +88,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
</div> </div>
<style lang="scss"> <style lang="scss">
.code-mirror :global(.CodeMirror) { .code-mirror {
height: auto; :global(.CodeMirror) {
height: auto;
}
:global(.CodeMirror-wrap pre) {
word-break: break-word;
}
} }
</style> </style>

View file

@ -174,7 +174,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
border: none; border: none;
border-radius: 5px; border-radius: 5px;
} }
:global(.CodeMirror) { :global(.CodeMirror) {
background: var(--code-bg); background: var(--code-bg);
} }