{"id":23654488,"url":"https://github.com/grygrflzr/highlightjs-ass","last_synced_at":"2026-02-17T03:03:39.502Z","repository":{"id":218238885,"uuid":"745928709","full_name":"GrygrFlzr/highlightjs-ass","owner":"GrygrFlzr","description":"Advanced SubStation Alpha syntax highlighting for highlight.js","archived":false,"fork":false,"pushed_at":"2025-02-02T18:18:16.000Z","size":98,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-23T06:05:44.716Z","etag":null,"topics":["ass","highlightjs","highlightjs-syntax","javascript","ssa","subtitle","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":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GrygrFlzr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-20T15:22:16.000Z","updated_at":"2025-02-27T07:41:07.000Z","dependencies_parsed_at":"2024-01-20T17:27:30.610Z","dependency_job_id":"acbbd223-7b8a-4774-9ac9-31650cc713df","html_url":"https://github.com/GrygrFlzr/highlightjs-ass","commit_stats":null,"previous_names":["grygrflzr/highlightjs-ass"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GrygrFlzr/highlightjs-ass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrygrFlzr%2Fhighlightjs-ass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrygrFlzr%2Fhighlightjs-ass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrygrFlzr%2Fhighlightjs-ass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrygrFlzr%2Fhighlightjs-ass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrygrFlzr","download_url":"https://codeload.github.com/GrygrFlzr/highlightjs-ass/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrygrFlzr%2Fhighlightjs-ass/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261423919,"owners_count":23156078,"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":["ass","highlightjs","highlightjs-syntax","javascript","ssa","subtitle","syntax-highlighting"],"created_at":"2024-12-28T19:00:20.762Z","updated_at":"2026-02-17T03:03:39.478Z","avatar_url":"https://github.com/GrygrFlzr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced SubStation Alpha plugin for highlight.js\n\n0BSD-licensed [`highlight.js`](https://github.com/highlightjs/highlight.js) plugin of the ASS/SSA subtitle file syntax.\n\n## What is ASS/SSA?\n\nThe original SubStation Alpha (SSA) format [dates back to at least 1996](https://web.archive.org/web/19961229054108/http://www.eswat.demon.co.uk/) and has been used for translating media across various written languages.\n\nAdvanced SubStation Alpha (ASS) is the latest iteration of SSA, versioned as `4.00+` as opposed to `4.00` and below for the original format. It does not have a true specification, but instead has two de-facto implementations: originally (xy-)vsfilter and later libass.\n\nThis project aims to cover both ASS and SSA whenever possible, but significant changes across major versions of SSA may hinder support for older versions. `libass` is treated as the actual specification for the purposes of this project, as they are cross-platform whereas `vsfilter` is limited to Windows, and `libass` maintainers try to keep compatibility with `vsfilter` whenever it makes sense.\n\n## Setup\n\nRequires node.js version 22.12 or later to build.\n\nThis project uses `pnpm` as its package manager. If you already installed the latest LTS versions of node.js, you'll already have `corepack` installed.\nUse `corepack pnpm install` to install all dependencies.\n\n## Generating CDN builds and Testing\n\nCDN-optimized builds can be generated with\n\n```sh\npnpm build\n```\n\nBoth markup and detection tests can be done via:\n\n```sh\npnpm test\n```\n\nWithout having to clone the `highlight.js` project.\n\nHowever, we are also compatible with the official suite used by `highlight.js`! Clone this project inside `highlight.js/extra` and then from the root directory containing `highlight.js` run:\n\n```sh\nnpm install\nnpm run build\nnpm run test\n```\n\nNote that `highlight.js` is [officially de-emphasizing the auto-detect feature](https://github.com/highlightjs/highlight.js/pull/3906/commits/57cf5a332e17611da54d8562c7398cca96722814), so `npm run test-detect` will yield 0 results, but we did make auto-detection work with our own test suite.\n\n## Usage\n\n### In the browser\n\nThe bare minimum for using this highlighter on a web page is linking to the `highlight.js` library, one of its themes, this plugin, and then calling `highlightAll`:\n\n**Modern ES6 method**\n\n```html\n\u003clink\n  rel=\"stylesheet\"\n  href=\"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/dark.min.css\"\n/\u003e\n\u003cscript type=\"module\"\u003e\n  import hljs from \"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/es/highlight.min.js\";\n  import hljsAss from \"https://cdn.jsdelivr.net/npm/highlightjs-ass@1.0.3/+esm\";\n  hljs.registerLanguage(\"ass\", hljsAss);\n  hljs.highlightAll();\n\u003c/script\u003e\n```\n\n**Traditional Method**\n\nMainly used if you need IE11 support.\n\n```html\n\u003clink\n  rel=\"stylesheet\"\n  href=\"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/dark.min.css\"\n/\u003e\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/highlightjs-ass@1.0.3\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  hljs.highlightAll();\n\u003c/script\u003e\n```\n\n**For the plaintext code to highlight**\n\nIt is highly recommended to wrap code blocks with `pre` and `code` tags, like this:\n\n```html\n\u003cpre\u003e\u003ccode class=\"language-ass\"\u003e\n[Script Info]\n...\n\u003c/code\u003e\u003c/pre\u003e\n```\n\nYou also want `class=\"language-ass\"` to be explicit about which language syntax should be used. We do support auto-detection, but short snippets may be errenously detected as other supported `highlight.js` languages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrygrflzr%2Fhighlightjs-ass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrygrflzr%2Fhighlightjs-ass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrygrflzr%2Fhighlightjs-ass/lists"}