{"id":17800930,"url":"https://github.com/refi64/pygments-dart","last_synced_at":"2026-01-11T13:37:25.240Z","repository":{"id":56837547,"uuid":"101659633","full_name":"refi64/pygments-dart","owner":"refi64","description":"Highlight source code snippets in your HTML files using pygments","archived":false,"fork":false,"pushed_at":"2018-01-02T23:43:34.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T05:06:47.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","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/refi64.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}},"created_at":"2017-08-28T15:46:17.000Z","updated_at":"2020-12-28T13:42:34.000Z","dependencies_parsed_at":"2022-09-12T11:51:32.745Z","dependency_job_id":null,"html_url":"https://github.com/refi64/pygments-dart","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/refi64%2Fpygments-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fpygments-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fpygments-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fpygments-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refi64","download_url":"https://codeload.github.com/refi64/pygments-dart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246758278,"owners_count":20828919,"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":[],"created_at":"2024-10-27T12:32:37.639Z","updated_at":"2026-01-11T13:37:25.233Z","avatar_url":"https://github.com/refi64.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pygments\n\nHighlight source code snippets in your HTML files using pygments.\n\n## Usage:\n\nIn *pubspec.yaml*:\n\n```yaml\ndependencies:\n  pygments: any\n\ntransformers:\n  - pygments:\n      # Here we define all the HTML elements pygments will run on\n      classes:\n        # First comes the DOM selector. This will match all *pre* elements that contain a class\n        # starting with *language*. For instance, this will match \u003cpre class=\"language-python\"\u003e.\n        # Note that these are just 100% standard DOM selectors!!\n        # Also note that an outer code tag will be stripped. e.g. given\n        # \u003cpre class=\"langauge-python\"\u003e\u003ccode\u003edef main: return 0\u003c/code\u003e\u003c/pre\u003e, the transformer will\n        # automatically lift out the *def main: return 0* and only highlight that, ignoring the\n        # outer code tag.\n        - \"pre[class|='language']\":\n            # Now we need to define the source language. You can do this using a regex as shown\n            # below. This will match the language-* class and extract just the language name\n            # (e.g. language-dart -\u003e dart).\n            re: \"language-(.*)\"\n            # By default, pygments will automatically unescape any HTML escape codes. For example,\n            # \u003cpre\u003ea \u0026gt; b\u003c/pre\u003e will be converted to *a \u003e b*. Set unescape to false to disable\n            # this.\n            unescape: false\n        # Here's another example. This will run only on elements like \u003cpre class=\"dart\"\u003e\u003c/pre\u003e.\n        - \"pre[class=dart]\":\n            # If your language is constant, you don't need to use a regex. Just use the lang\n            # property instead:\n            lang: dart\n        # Last example! This is for CSS:\n        - \"pre[class=css]\":\n            # In the cases where you aren't passing any other options, the default option will\n            # be *lang*. So something like:\n            # - \"pre[class=dart]\":\n            #     lang: dart\n            # can be shortened to:\n            # - \"pre[class=dart]\": dart\n            css\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fpygments-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefi64%2Fpygments-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fpygments-dart/lists"}