Add support for Glimmer JS/TS files#2163
Closed
dknutsen wants to merge 4 commits intorouge-ruby:masterfrom
Closed
Conversation
NullVoxPopuli
approved these changes
Sep 23, 2025
Contributor
Contributor
Author
|
Closing in favor of #2165 |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 7, 2025
* chore: Temporarily simplified /demos * chore: Temporarily added realistic examples for handlebars, javascript, and typescript * chore: Scaffolded lexers. Added demos for gjs and gts. * feature: Located <template> tags * wip, feature: Delegated templates to Handlebars * Escape closing </template> tag and add specs (#1) * fix: update regex to correctly delegate handlebars in gjs and gts lexers * chore: update demo to include javascript after the closing template tag * chore: update demo to include typescript after the closing template tag * test: add guessing test for gjs and gts lexer * refactor: Removed unused code * chore: Tested a second example * Revert "chore: Tested a second example" This reverts commit a9953db. * Revert "chore: Temporarily added realistic examples for handlebars, javascript, and typescript" This reverts commit 25eddf1. * Revert "chore: Temporarily simplified /demos" This reverts commit 7822430. * refactor: Added specs, demos, and visual samples for gjs and gts * bugfix: Temporarily removed a component argument from demos, because an existing bug in the handlebars lexer causes tests to fail * Add specs from #2163 (#3) * chore: Copied specs from #2163 * refactor: Extracted specs for lexing --------- Co-authored-by: Dan Knutsen <dknutsen@gmail.com> --------- Co-authored-by: Lukas Nys <nyslukas@gmail.com> Co-authored-by: Dan Knutsen <dknutsen@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds lexers for
.gts/.gjsfiles. These are "Glimmer Typescript/Javascript" files used for components by the Ember front-end application framework.This file format is mostly similar to Vue components. At a high level the files are either JavaScript or TypeScript with embedded Handlebars templates wrapped in
<template>...</template>tags.I'd like to add this support to Rouge for GitLab/Jekyll/GitHub Pages/dev.to/etc.
GitLab tracking issues/MRs: