Raku / doc-website

Tooling to build/run the documentation website
Artistic License 2.0
7 stars 10 forks source link

Some coloring for syntax is weird #216

Open rawleyfowler opened 1 year ago

rawleyfowler commented 1 year ago

If you goto: https://docs.raku.org/language/typesystem.html#subset

You'll notice that the subset declaration is all one color:

image

I expect it to more accurately reflect how a subeset declaration looks like in a code editor, something like: image

finanalyst commented 1 year ago

This is an artifact of the syntax highlighter. There are some other problems too. eg, the highlighter does not handle multiple HERETO There is an issue to replace the syntax highlighter.

2colours commented 1 year ago

I think the syntax highlighter should rather be fixed than replaced; there is nobody to reliably provide a better highlighter anyway. https://github.com/Raku/atom-language-perl6

finanalyst commented 1 year ago

@2colours problem is that atom syntax highlighter has a very large stack of node.js dependencies and some of them have gone out of date.

2colours commented 1 year ago

The way it's integrated into the site might be ineffective - but that has nothing to do with the output itself.

Regarding the output, we need to maintain it - emphasis on both "we" and "need to", as in, it can't be let as it is, and there's nobody else who would magically do it.

I try to dedicate this weekend to sort some stuff out with it - firstly, ditch Coffeescript (and CSON) as a poorly aged dependency of the project. The repository needs to drift towards being a plain textmate highlighter format "content repository", much like Raku/doc is the content of the documentation and this repository is the actual exported form.

2colours commented 8 months ago

For what it's worth, I did reorganize some things with the highlighter (without purposefully changing the content, from what I can tell) and the highlighting does seem different from the one given in the issue.

subset Positive of Int where * > -1

Although it is also different from the one seen here on Github, which does look better still... image

By the way, isn't the snippet just stupid? Sure, it's just demonstration but what's the added value of having a wrong definition of "positive" there? I think it just makes us look silly. I will change that.