Skip to content

Commit 10951cd

Browse files
committed
Fix highlighting in blocks with carets
1 parent db5dedb commit 10951cd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/highlight.nu

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
const DELIMITER = "BEGIN EXAMPLE"
22

33
def main [] {
4-
let source = $in
4+
let source = (
5+
$in
6+
# prune leading caret
7+
| str replace -r '^[>>]\s+' ''
8+
)
59
let highlighted = $source | nu-highlight
610
if $DELIMITER in $source {
711
$highlighted

0 commit comments

Comments
 (0)