Add "start with line number" and "continue line number" syntax to highlighted code blocks ()

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
mrdrogdrog 2020-06-24 23:53:26 +02:00 committed by GitHub
parent cdadc7b41a
commit 312c86e702
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 17 deletions
src/components/common/highlighted-code

View file

@ -5,8 +5,8 @@
.markdown-body pre code.hljs {
padding: 16px;
display: grid;
grid-template-columns: auto minmax(0, 1fr);
display: grid;
grid-template-columns: auto minmax(0, 1fr);
&.showGutter {
.linenumber {
@ -25,17 +25,17 @@
display: flex;
align-items: flex-end;
&:before {
content: attr(data-line-number);
}
}
}
&.showGutter .line {
&.showGutter .codeline {
margin: 0 0 0 16px;
}
&.wrapLines .line {
&.wrapLines .codeline {
white-space: pre-wrap;
}