Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/edit/src/buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2150,6 +2150,7 @@ impl TextBuffer {
HighlightKind::MarkupList => Some(IndexedColor::BrightBlue),
HighlightKind::MarkupStrikethrough => None,
HighlightKind::MetaHeader => Some(IndexedColor::BrightBlue),
HighlightKind::Invalid => None,
};
let attr = match curr.kind {
HighlightKind::MarkupBold => Some(Attributes::Bold),
Expand Down
2 changes: 2 additions & 0 deletions crates/lsh-bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ fn run_render(generator: lsh::compiler::Generator, path: &Path) -> anyhow::Resul
"markup.strikethrough" => "\x1b[9m", // Strikethrough
"meta.header" => "\x1b[94m", // Bright Blue

"invalid" => "\x1b[41;97m", // White on Red

_ => {
unknown_kinds.push(hk.identifier.to_string());
""
Expand Down
36 changes: 29 additions & 7 deletions crates/lsh/definitions/powershell.lsh
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,43 @@ pub fn powershell() {
} else if /'/ {
loop {
yield string;
if /\\./ {}
else if /'/ { yield string; break; }
if /'/ { yield string; break; }
await input;
}
} else if /@'/ {
if /\s*$/ { // HereStrings must start at the end of the line
yield string;
loop {
if /.*/ {}
yield string;
await input;
if /'@/ {
yield string;
break;
}
}
} else if /.*$/ {
Comment thread
DHowett marked this conversation as resolved.
Outdated
yield invalid;
}
} else if /@"/ {
loop {
if /\s*$/ { // HereStrings must start at the end of the line
yield string;
if /\\./ {}
else if /"@/ { yield string; break; }
await input;
loop {
if /.*/ {}
yield string;
await input;
if /"@/ {
yield string;
break;
}
}
} else if /.*$/ {
yield invalid;
}
} else if /"/ {
loop {
yield string;
if /\\./ {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, woops lol

if /`./ {}
else if /"/ { yield string; break; }
await input;
}
Expand Down
Loading