{"id":18718538,"url":"https://github.com/highlightjs/highlightjs-lang","last_synced_at":"2025-11-10T15:30:14.730Z","repository":{"id":66013980,"uuid":"590237996","full_name":"highlightjs/highlightjs-lang","owner":"highlightjs","description":"A highlight.js grammar for Minecraft's language files","archived":false,"fork":false,"pushed_at":"2023-01-31T17:52:15.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-12-28T10:47:51.177Z","etag":null,"topics":["highlight-js","highlightjs-syntax","syntax-highlighting"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/highlightjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-01-18T00:14:29.000Z","updated_at":"2023-02-25T15:01:10.000Z","dependencies_parsed_at":"2023-04-27T20:01:18.116Z","dependency_job_id":null,"html_url":"https://github.com/highlightjs/highlightjs-lang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlightjs%2Fhighlightjs-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlightjs%2Fhighlightjs-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlightjs%2Fhighlightjs-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlightjs%2Fhighlightjs-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/highlightjs","download_url":"https://codeload.github.com/highlightjs/highlightjs-lang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239581767,"owners_count":19662960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["highlight-js","highlightjs-syntax","syntax-highlighting"],"created_at":"2024-11-07T13:21:51.804Z","updated_at":"2025-11-10T15:30:14.662Z","avatar_url":"https://github.com/highlightjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Highlight.js Lang\n\nThis repository contains a language grammar for Minecraft's `.lang` files for [highlight.js][hljs-website].\n\n## Basic Usage\n\n### Web Browser\n\nFirst, include the main library as a script. Then, link this grammar. Be sure to also include a [theme][hljs-themes].\n\n```html\n\u003clink rel=\"stylesheet\" href=\"/path/to/styles/default.min.css\"\u003e\n\u003cscript src=\"/path/to/highlight.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"/path/to/lang.min.js\"\u003e\n\u003cscript\u003ehljs.highlightAll();\u003c/script\u003e\n```\n\nThis will find and highlight code inside of `\u003cpre\u003e\u003ccode\u003e` tags; it tries\nto detect the language automatically. If automatic detection doesn’t\nwork for you, or you simply prefer to be explicit, you can specify the language manually in the using the `class` attribute:\n\n```html\n\u003cpre\u003e\u003ccode class=\"language-lang\"\u003e...\u003c/code\u003e\u003c/pre\u003e\n```\n\n### Node.js on the Server\n\nThe bare minimum to auto-detect the language and highlight some code.\n\n```js\n// load the library and ALL languages\nhljs = require('highlight.js');\nhtml = hljs.highlightAuto('gameTip.findTree=Punch a tree to gather wood.').value\n```\n\nTo highlight code with a specific language, use `highlight`:\n\n```js\nhtml = hljs.highlight('gameTip.findTree=Punch a tree to gather wood.\\n...', {language: 'lang'}).value\n```\n\n\u003e **Note**: Because lang can be so generic at times, it is recommended to not rely on autodetection and instead use `highlight` and specify the language.\n\nSee [Importing the Library](https://github.com/highlightjs/highlight.js#importing-the-library) for more examples of `require` vs `import` usage, etc.  For more information about the result object returned by `highlight` or `highlightAuto` refer to the [api docs](https://highlightjs.readthedocs.io/en/latest/api.html).\n\n[hljs-website]: https://highlightjs.org/\n[hljs-themes]: https://highlightjs.org/static/demo/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhighlightjs%2Fhighlightjs-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhighlightjs%2Fhighlightjs-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhighlightjs%2Fhighlightjs-lang/lists"}