-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax highlighting - eyes needed #419
Comments
Actually I've already done something similar in Rainbow with quote adverbs already (see the Adverbs section here). This shouldn't be too hard to get right. |
Quick smartphone response to Patrick.
```
=for code :allow<B I>
my $var = 'filename.conf'.B<IO>.I<slurp>(:close);
my $strng = 'This is B<bold> but this is NOT U<underlined>';
Normal para in Rakudoc source.
```
…On Mon, 11 Nov 2024, 13:10 Patrick Böker, ***@***.***> wrote:
- in the discussions about RakuDoc v2, the allow option is difficult
to implement in combination with syntax highlighting, and needs to be
handled separately. This will be developed in due course. The problem
existed with the previous highlighter too.
Actually I've already done something similar in Rainbow with quote adverbs
already (see the Adverbs section here
<https://git.sr.ht/~patrickb/Rainbow/tree/main/item/t/test-data/string.rakumod>).
This shouldn't be too hard to get right.
Can you provide a quick primer how this option is meant to work exactly?
(Ideally create a ticket.)
—
Reply to this email directly, view it on GitHub
<#419 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACYZHGOIAJ63GZC7CBKDDT2ACUDJAVCNFSM6AAAAABRO7STZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRYGE2DGOJWG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The comment in the last example of the leftward feed operator ( docs.raku.org ) seems peculiar : my @result
<== sort()
<== grep({ /<[PE]>/ })
<== my @caps # unlike ==>, there's no need for additional statement
<== map({ .tc })
<== <people of earth>; |
The last example in Literal Strings: Q ( docs.raku.org ) seems unaware of a unicode quoting character⦅ -- FULLWIDTH LEFT WHITE PARENTHESIS : Q「「Delimiters can be repeated/nested if they are adjacent.」」
Q⦅Quoting with fancy unicode pairs⦆ |
@habere-et-dispertire Thanks for the issues. |
@habere-et-dispertire Your second question may be due to interpolation?? |
If I understand correctly, then it is being interpolated when it shouldn't. Note that the character is not being repeated -- it is a single character : say '⦅'.chars
# 1
say '⦅'.uniname.say
# FULLWIDTH LEFT WHITE PARENTHESIS
say '⦅'.ord.base(16)
# FF5F Rainbow appears aware of this to the degree that it includes it as an open-close-punct under hex value I'd hazard a guess that we need a case for capital given $<q-letter> {
when "q" { $*quote-mode.q = True; }
when "qq" | "qqw" | "qqww" | "qqx" {
$*quote-mode.s = True;
$*quote-mode.a = True;
$*quote-mode.h = True;
$*quote-mode.f = True;
$*quote-mode.c = True;
$*quote-mode.b = True;
}
# ... |
At the end of the interpolation basics page, there is a final colon suggestive of a missing example to follow ? |
@habere-et-dispertire @coke The |
@finanalyst I've now released Rainbow 0.3.0. That improves the RakuDoc support tremendously, including |
Here, a screenshot from this page, near the end of the linked section: https://docs.raku.org/language/containers#Flattening,_items_and_containers the highlighting of the decont operator used on $x looks odd, this one: i think the two angle brackets should at least be the same color. not sure what exactly they should be highlighted as. |
On December 25, 2024 10:50:19 PM GMT+01:00, timo ***@***.***> wrote:
Here, a screenshot from this page, near the end of the linked section: https://docs.raku.org/language/containers#Flattening,_items_and_containers
![image](https://github.com/user-attachments/assets/c6130426-83f1-458c-bec5-4be2cd51588c)
the highlighting of the decont operator used on $x looks odd, this one: `$x<>`
i think the two angle brackets should at least be the same color. not sure what exactly they should be highlighted as.
That's a Rainbow issue. I'll take it. Cross posted here: <https://todo.sr.ht/~patrickb/Rainbow/4>
|
another post "full of" Rainbow issues i've stumbled upon: the code a little bit below https://docs.raku.org/language/variables#The_$__variable
looks like this: and generates HTML like this:
i see three oddities here:
Here's a little bit of code from further down the page after https://docs.raku.org/language/variables#The_$/_variable
is highlighted like this:
And looks like this: The oddities are:
Here in the code after https://docs.raku.org/language/variables#Named_attributes
it looks like the In the code
for some reason the In the code after https://docs.raku.org/language/variables#The_$__variable
we get the On the rest of the page there's a few recurring issues:
And finally I think I have an issue that's more related to the original idea of this github issue: REGEX_LITERAL and COMMENT have the same color, at least in rainbow-dark.css That's all I've seen on this page so far :) |
@Raku/core
We have changed the syntax highlighter from one developed for the atom editor (atom-perl6-highlighter) to a Raku based one (Rainbow).
<repo root>/Website/plugins/rainbow/scss/rainbow-light.scss
.../scss/rainbow-dark.scss
$code-.....
and start at about line 15.Known problems:
=for code :allow<C>
or other value in 'allow', the:allow
option is not respected.The text was updated successfully, but these errors were encountered: