atom-language
atom-language copied to clipboard
Q// highlight ignores adverbs
Don't know if this is too much to ask from a syntax highlighter, but I notice the Q//
highlighting ignores the specified adverbs. So if you specify :s
and :c
, code blocks and scalars are still highlighted as regular strings. Makes it hard to spot them in a large heredoc.
Example Code
say Q:c/foo {"h" ~ "i"} bar/;
say qq /foo {"h" ~ "i"} bar/;
my $foo = 42;
say Q:s/foo $foo bar/;
say qq /foo $foo bar/;
Picture [optional]
Leave this in. For internal use.
- [ ] Fixed in Master
- [ ] Fixed in Release
- [ ] Has Tests
- [ ] Passes Tests
A related issue: embedded heredoc closing delimiter closes the first heredoc:
sub page ($routines) {
Q:c:to/END/
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Perl 6 Routine Map</title>
<div class="container">
<table id="routines"> {
join "\n", $routines.map: qq:to/END/
<tr>
END
}
</table>
</div>
<script src="/packed/app-ee94204ae3189f6634650ad1ab13c95b.min.js"></script>
END
}
Even if the delimiter simply starts with the other's heredoc's delimiter:
I only just recently got qq heredocs highlighting some variables. We can leave this ticket here, and apply it to the Q adverbs when I work on the qq heredocs again (was kinda difficult to get variables to highlight).