feat: Replace == with <mark> (#234)
Co-authored-by: SAF <saf@saf.saf>
| | |
| | | } |
| | | } |
| | | |
| | | mark { |
| | | background-color: var(--highlighted); |
| | | color: var(--gray); |
| | | } |
| | |
| | | --lightgray: #f0f0f0; |
| | | --outlinegray: #dadada; |
| | | --million-progress-bar-color: var(--secondary); |
| | | --highlighted: #f5dfaf88; |
| | | } |
| | | |
| | | [saved-theme="dark"] { |
| | |
| | | --gray: #d4d4d4 !important; |
| | | --lightgray: #292633 !important; |
| | | --outlinegray: #343434 !important; |
| | | --highlighted: #574010; |
| | | } |
| | | |
| | | |
| | |
| | | {{ $content = $content | replaceRE "blockquote class=callout" "blockquote" }} |
| | | {{end}} |
| | | |
| | | {{/* Make ==text== into <mark>text</mark> */}} |
| | | {{$mark := findRE "(?Us)==([^\\$]+)==" $content}} |
| | | {{range $mark}} |
| | | {{$fixed := printf "<mark>%s</mark>" (replace . "==" "")}} |
| | | {{$content = replace $content . $fixed}} |
| | | {{end}} |
| | | |
| | | {{ $content | safeHTML }} |