Skip to content

Commit

Permalink
Fix syntax highlighting (#187)
Browse files Browse the repository at this point in the history
* Fix syntax highlighting

* Add toggle for rounded corners
  • Loading branch information
Hysterelius authored Aug 9, 2024
1 parent 75cd405 commit d5acabc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
1 change: 1 addition & 0 deletions COPY-TO-ROOT-SASS/abridge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@
//$misc: false,
//$grid: true,//Infinity Grid, column based layouts.
//$syntax: true,//syntax highlighting for code blocks
// $coderoundhighlight: false,//round corners on highlighted code blocks
);
@use "extra";
/******************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion content/overview-code-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fn main() {
```

### Bash
```bash
```bash,hl_lines=5
#!/bin/bash
for d in /sys/kernel/iommu_groups/*/devices/*; do
n=${d#*/iommu_groups/*}; n=${n%%/*}
Expand Down
33 changes: 27 additions & 6 deletions sass/abridge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ $imgswap: true !default;//Image Swap on hover/click
$misc: false !default;
$grid: true !default;//Infinity Grid, column based layouts.
$syntax: true !default;//syntax highlighting for code blocks
$coderoundhighlight: false !default;//round corners on highlighted code blocks


/******************************************************************************
Expand Down Expand Up @@ -933,12 +934,32 @@ $syntax: true !default;//syntax highlighting for code blocks
margin: 0;
// Highlighted text
color: var(--h1);
mark {
display: block;
color: unset;
padding: 0;
background-color: var(--h0);
filter: brightness(var(--ha));
@if $coderoundhighlight {
mark {
border-radius: unset;
}
td:first-child {
mark {
border-top-left-radius: var(--br);
border-bottom-left-radius: var(--br);
}
}
td:last-child {
mark {
border-top-right-radius: var(--br);
border-bottom-right-radius: var(--br);
}
}
}
}
mark {
display: block;
color: unset;
padding: 0;
background-color: var(--h0);
filter: brightness(var(--ha));
@if $coderoundhighlight {
border-radius: var(--br);
}
}
td, th, tr {
Expand Down

0 comments on commit d5acabc

Please sign in to comment.