{"id":28347164,"url":"https://github.com/sgryjp/markdown_math_escape","last_synced_at":"2026-04-25T23:35:14.422Z","repository":{"id":57439701,"uuid":"304893317","full_name":"sgryjp/markdown_math_escape","owner":"sgryjp","description":"Python-Markdown extension to escape math expressions like $e^{i\\pi} + 1 = 0$","archived":false,"fork":false,"pushed_at":"2020-12-17T08:13:12.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-18T19:08:05.536Z","etag":null,"topics":["extension","gitlab","katex","math","mathjax","python","python-markdown"],"latest_commit_sha":null,"homepage":"","language":"Python","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/sgryjp.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":"2020-10-17T14:15:37.000Z","updated_at":"2023-11-04T02:37:45.000Z","dependencies_parsed_at":"2022-09-26T17:20:36.655Z","dependency_job_id":null,"html_url":"https://github.com/sgryjp/markdown_math_escape","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sgryjp/markdown_math_escape","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgryjp%2Fmarkdown_math_escape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgryjp%2Fmarkdown_math_escape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgryjp%2Fmarkdown_math_escape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgryjp%2Fmarkdown_math_escape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgryjp","download_url":"https://codeload.github.com/sgryjp/markdown_math_escape/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgryjp%2Fmarkdown_math_escape/sbom","scorecard":{"id":814589,"data":{"date":"2025-08-11","repo":{"name":"github.com/sgryjp/markdown_math_escape","commit":"059225c537cf6c9951dc8dbf76df8e5366c6a4a0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/sgryjp/markdown_math_escape/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/sgryjp/markdown_math_escape/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/sgryjp/markdown_math_escape/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/sgryjp/markdown_math_escape/test.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:30","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.20.12.17 not signed: https://api.github.com/repos/sgryjp/markdown_math_escape/releases/35401384","Warn: release artifact v0.20.10.18 not signed: https://api.github.com/repos/sgryjp/markdown_math_escape/releases/32721285","Warn: release artifact v0.20.12.17 does not have provenance: https://api.github.com/repos/sgryjp/markdown_math_escape/releases/35401384","Warn: release artifact v0.20.10.18 does not have provenance: https://api.github.com/repos/sgryjp/markdown_math_escape/releases/32721285"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T13:56:32.431Z","repository_id":57439701,"created_at":"2025-08-23T13:56:32.431Z","updated_at":"2025-08-23T13:56:32.431Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32280979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["extension","gitlab","katex","math","mathjax","python","python-markdown"],"created_at":"2025-05-27T15:14:58.045Z","updated_at":"2026-04-25T23:35:14.417Z","avatar_url":"https://github.com/sgryjp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# markdown_math_escape\n\n![Test](https://github.com/sgryjp/markdown_math_escape/workflows/Test/badge.svg?branch=main)\n\n[Python-Markdown](https://python-markdown.github.io/) extension to escape math\nexpressions like `$e^{i\\pi} + 1 = 0$`.\n\n## Description\n\nThe benefits of using this extension are:\n\n1. No special escaping syntax is needed\n   - You can write `\\left\\{`, not `\\left\\\\{`.\n2. On writing, you are free to choose any delimiter style as you like\n   - They will be converted to \"brackets\" styled delimiters so that they can be\n     processed using [MathJax](https://www.mathjax.org/) or\n     [KaTeX](https://katex.org/) without any configuration.\n   - If you are using GitLab, you can choose `gitlab` delimiter style so that\n     the file will be rendered with beautiful mathematics on GitLab.\n3. It's fast\n   - This extension _does not render_ mathematics\n\nOn the other hand:\n\n- You need to setup either MathJax or KaTeX for client-side rendering\n  - If you are using Nikola, you can use it's built-in feature to enable them\n  - Otherwise, somehow you need to load and execute one of them\n    (using a theme which supports them, for example)\n\nTechnically, this extension firstly protects math expressions from\nPython-Markdown and its other extensions so that no unexpected (unhappy) change\nwill happen. Then it converts their delimiters (enclosing special characters)\nto \"brackets\" styled delimiters... which is supported by default configuration\nof MathJax and KaTeX.\n\n## Installation\n\nFirstly, install the extension by the command below:\n\n    pip install markdown_math_escape\n\nSecondly, you need to let Python-Markdown to use it. How to do it depends on\nhow you are using Python-Markdown. Please see [examples](#examples)\nfor an example which matches your usage.\n\n## Options\n\nThe only available option is \"`delimiters`\" which specifies the type of\ndelimiters enclosing mathematics in your markdown files.\nSee the table below for supported values.\n\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003e\u003ccode\u003edelimiters\u003c/code\u003e\u003c/th\u003e\n            \u003cth\u003eInline (non-display mode)\u003c/th\u003e\n            \u003cth\u003eDisplay mode math\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd\u003e\u003ccode\u003edollers\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003e$e^{i\\pi} + 1 = 0$\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003cpre\u003e$$\ne^{i\\pi} + 1 = 0\n$$\u003c/pre\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003e\u003ccode\u003ebrackets\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003e\\(e^{i\\pi} + 1 = 0\\)\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003cpre\u003e\\[\ne^{i\\pi} + 1 = 0\n\\]\u003c/pre\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003e\u003ccode\u003egitlab\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003e$`e^{i\\pi} + 1 = 0`$\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003cpre\u003e```math\ne^{i\\pi} + 1 = 0\n```\u003c/pre\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Examples\n\n### Python script\n\nIf you are using Python-Markdown directly in your Python script (or library),\njust do so in the standard way. For example:\n\n```python\nimport markdown as md\nfrom markdown_math_escape import MathEscapeExtension\n\nmd.markdown(\n    some_text,\n    extensions=[\n        \"markdown.extensions.codehilite\",\n        \"markdown.extensions.extra\",\n        MathEscapeExtension(delimiters=\"dollers\"),\n    ],\n)\n```\n\nPlease refer to the\n[Python-Markdown's document](https://python-markdown.github.io/extensions/)\nfor more details.\n\n### Pelican\n\nIf you are using Python-Markdown as part of\n[Pelican](https://blog.getpelican.com/),\nyou can use extension name `markdown_math_escape`. For example:\n\n```python\n# pelicanconf.py\nMARKDOWN = {\n    'extension_configs': {\n        # ...other extensions...\n        \"markdown_math_escape\": {\"delimiters\": \"dollers\"},\n    }\n}\n```\n\nPlease refer to the\n[Pelican's document](https://docs.getpelican.com/en/stable/settings.html)\nfor more details.\n\n### Nikola\n\nIf you are using Python-Markdown as part of\n[Nikola](https://getnikola.com/),\nyou can use extension name `markdown_math_escape`. For example:\n\n```python\n# conf.py\nMARKDOWN_EXTENSIONS = [\n    # ...other extensions...\n    'markdown_math_escape',\n]\n\nMARKDOWN_EXTENSION_CONFIGS = {\n    DEFAULT_LANG: {\n        \"markdown_math_escape\": {\"delimiters\": \"dollers\"},\n    },\n}\n```\n\nNote that this extension is compatible with [Nikola's built-in option to enable\nMathJax or KaTeX](https://getnikola.com/handbook.html#math). Just set\n`has_math` metadata field in your post to `true` and select MathJax or KaTeX by\nspecifying `USE_KATEX` value in `conf.py`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgryjp%2Fmarkdown_math_escape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgryjp%2Fmarkdown_math_escape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgryjp%2Fmarkdown_math_escape/lists"}