mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Improve line highlighting: left marker instead of different background
This commit is contained in:
@@ -468,7 +468,7 @@ The start address specifies the memory address of our `_start` function.
|
||||
Here the function name `_start` becomes important.
|
||||
If we rename the function to something else (e.g., `_start_here`) and recompile, we see that no start address is set in the ELF file anymore:
|
||||
|
||||
```hl_lines=5
|
||||
```bash,hl_lines=5
|
||||
❯ rust-objdump -f target/x86_64-unknown-none/debug/kernel
|
||||
|
||||
target/x86_64-unknown-none/debug/kernel: file format elf64-x86-64
|
||||
|
||||
@@ -263,6 +263,20 @@ pre {
|
||||
overflow: auto;
|
||||
word-wrap: normal;
|
||||
background-color: var(--code-background-color);
|
||||
&.language-rust, &.language-toml {
|
||||
padding-left: 15px;
|
||||
mark {
|
||||
border-left: 3px solid rgba(0, 200, 0, 1);
|
||||
margin-left: -10px;
|
||||
padding-left: 7px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
&.language-bash mark {
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
text-decoration-color: rgba(255, 255, 155, 1);
|
||||
}
|
||||
}
|
||||
pre code {
|
||||
padding: 0;
|
||||
@@ -275,8 +289,8 @@ pre mark {
|
||||
display: block;
|
||||
// use the code color (instead of black)
|
||||
color: inherit;
|
||||
// override the background color (instead of black)
|
||||
background-color: rgba(0, 255, 0, 0.1) !important;
|
||||
// override the hardcoded background color (set to black by the theme)
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
|
||||
Reference in New Issue
Block a user