Skip to content
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

Highlight ALAN: Add Block Comments Support #121

Closed
6 tasks done
tajmone opened this issue Aug 5, 2021 · 1 comment
Closed
6 tasks done

Highlight ALAN: Add Block Comments Support #121

tajmone opened this issue Aug 5, 2021 · 1 comment
Assignees
Labels
👑 HTML Format Issues with conversion to HTML format 🔨 Highlight Tool: Highlight (syntax highlighter) 🔨 Sass Tool: Dart Sass ⭐ syntax highlighting Topic: Syntax Highlighting

Comments

@tajmone
Copy link
Collaborator

tajmone commented Aug 5, 2021

Our custom ALAN syntax for Highlight doesn't cover the new block comments that will be available with ALAN Beta8.

  • Update ALAN syntax for Highlight to support block comments.
    • Add new tweaked syntax to repository (currently relying on official package).
  • Update Sass theme for ALAN to cover the com class for block comments.
  • Update developer test docs in _dev/styles-tests/:
    • Remove warning for Highlight not supporting block comments.
  • Submit updated syntax to Highlight repository.

Ongoing implementation work can be tracked on the ALAN Testbed project:

but so far I've been struggling to implement block comments supports due to Highlight quirks in precedence order of matching RegExs — but I think I've found a fix for this via custom hooks code, just need to sit down and work on it.

@tajmone tajmone added ⭐ syntax highlighting Topic: Syntax Highlighting 🔨 Highlight Tool: Highlight (syntax highlighter) labels Aug 5, 2021
@tajmone tajmone self-assigned this Aug 5, 2021
@tajmone tajmone added this to the Highlight Integration milestone Aug 5, 2021
@tajmone tajmone added 👑 HTML Format Issues with conversion to HTML format 🔨 Sass Tool: Dart Sass labels Aug 21, 2021
@tajmone
Copy link
Collaborator Author

tajmone commented Aug 21, 2021

Block Comments Implemented

I've updated the Highlight syntax for ALAN to cover block comments, which can be found in the ALAN Testbed:

Now I only need to add the new syntax to this repo, update the Sass themes to cover block comments. Before we were using the native ALAN syntax that ships with HL, but now I'll be adding our custom syntax, so that we can start using it before it's included in the next HL release package (of course, I'll submit it to HL too). This will also simplify adding other custom syntaxes, e.g. for the EBNF blocks.

@tajmone tajmone pinned this issue Aug 21, 2021
@tajmone tajmone unpinned this issue Aug 21, 2021
tajmone added a commit that referenced this issue Aug 21, 2021
Update ALAN syntax for Highlight to support block comments (fixes #121).
Update Sass sources to cover block comments (`.com`) in ALAN themes.

Create new folder `_assets/hl/langDefs/` and add to it our `alan.lang`
custom syntax.

Update `_assets/hl/README.md`, and add usage instructions.

Update HTML build scripts for "Author Guide" and dev tests by defining
the `highlightDir` env var as an absolute path to `_assets/hl/`, so
that Highlight will use our custom syntax instead of the default one
that's bundled with it.

Update dev test docs, removing from the Highlight HTML doc the warning
about ALAN block comments being not supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👑 HTML Format Issues with conversion to HTML format 🔨 Highlight Tool: Highlight (syntax highlighter) 🔨 Sass Tool: Dart Sass ⭐ syntax highlighting Topic: Syntax Highlighting
Projects
None yet
Development

No branches or pull requests

1 participant