Skip to content

feat: add hjson#471

Merged
octref merged 3 commits into
shikijs:mainfrom
AkaraChen:main
May 22, 2023
Merged

feat: add hjson#471
octref merged 3 commits into
shikijs:mainfrom
AkaraChen:main

Conversation

@AkaraChen

Copy link
Copy Markdown
Contributor
  • Add a test if possible

  • Format all commit messages with Conventional Commits

  • I have read docs for adding a language.

  • I have searched around and this is the most up-to-date, actively maintained version of the language grammar.

  • I have added a sample file that includes a variety of language syntaxes and succinctly captures the idiosyncrasy of a language. See docs for requirement.

@netlify

netlify Bot commented May 15, 2023

Copy link
Copy Markdown

Deploy Preview for shiki-matsu ready!

Name Link
🔨 Latest commit bd5fd48
🔍 Latest deploy log https://app.netlify.com/sites/shiki-matsu/deploys/646b0aae8d1e2400082df7bf
😎 Deploy Preview https://deploy-preview-471--shiki-matsu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@octref octref left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small change needed. Thanks for your contribution!

Comment thread scripts/grammarSources.ts Outdated
['haml', 'https://github.com/karuna/haml-vscode/blob/master/syntaxes/haml.json'],
['haskell', 'https://github.com/octref/language-haskell/blob/master/syntaxes/haskell.json'],
['hcl', 'https://github.com/hashicorp/syntax/blob/main/syntaxes/hcl.tmGrammar.json'],
['hjson', 'https://raw.githubusercontent.com/hjson/textmate-hjson/master/Syntaxes/Hjson.tmLanguage'],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of this:

export function convertGHURLToDownloadURL(ghURL: string) {
const oldPath = url.parse(ghURL).path
return 'https://raw.githubusercontent.com' + oldPath.replace('/blob/', '/')
}

You can use the URL directly:

https://github.com/textmate/json.tmbundle/blob/master/Syntaxes/JSON.tmLanguage

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edited.

@AkaraChen
AkaraChen requested a review from octref May 22, 2023 06:25
@octref
octref merged commit 91ceac7 into shikijs:main May 22, 2023
@octref

octref commented May 22, 2023

Copy link
Copy Markdown
Collaborator

Looks great. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants