PyMdown Extensions
Extensions for Python Markdown.
Documentation
Extension documentation is found here: https://facelessuser.github.io/pymdown-extensions/.
License
License is MIT except for a few exceptions. See LICENSE for more info.
Extensions for Python Markdown.
Extension documentation is found here: https://facelessuser.github.io/pymdown-extensions/.
License is MIT except for a few exceptions. See LICENSE for more info.
TL;DR: this is a draft to improve on the current implementation of the Tabbed extension. It is by no means ready for implementation. It should serve as a base for further discussion to learn whether we can gravitate towards a better solution than we currently have. There are still problems with this approach.
The Tabbed extension is pretty awesome and many users love it. It provides a lot of value, especially to Material for MkDocs. However, it suffers from some problems that are not solvable without additional JavaScript. The main problem is that on narrower screen sizes, tabs are broken onto separate lines, like here for example "Hide both":
This cannot be mitigated, as the tabs markup is defined as follows:
<container>
<!-- 1st tab -->
<input 1 />
<label 1 />
<content 1 />
<!-- 2nd tab -->
<input 2 />
<label 2 />
<content 2 />
...
</container>
In order to make the labels overflow and scrollable, they would need to be located inside a container. With my knowledge of HTML and CSS, I'm very certain that there's no way to solve this problem without changing the underlying HTML. Furthermore, this would break the current tabs activation approach which relies entirely on co-location of input and label elements.
I've re-architected the tabs HTML and found a solution that allows us to overflow the tabs label container. It looks like this:
https://user-images.githubusercontent.com/932156/128594641-00fb9e53-facc-43f2-8a2f-79c418baad27.mp4
The HTML can be found here, so just drop it into a *.html file and play with it:
<html>
<head>
<style>
/* --- Boilerplate --- */
body {
font-family: sans-serif;
margin: 40px;
}
body > label {
display: inline-block;
padding: 0px 0px 20px;
cursor: pointer;
}
article {
box-shadow: 0 0 10px black;
overflow: hidden;
}
:checked ~ article {
width: 400px;
}
/* --- Tab label --- */
/* Tab input */
.tabbed-set input {
position: absolute;
width: 0;
height: 0;
opacity: 0;
}
/* Tab label container */
.tabbed-labels {
display: flex;
overflow: auto;
box-shadow: 0 -1px 0 #CCC inset;
scroll-snap-type: x proximity;
}
/* Tab label */
.tabbed-labels > * {
display: inline-block;
padding: 10px;
white-space: nowrap;
scroll-snap-align: start;
cursor: pointer;
}
/* Hide scrollbar for Chrome, Safari and Opera */
.tabbed-labels::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.tabbed-labels {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
/* Tab label is active */
.tabbed-set input:nth-child(1):checked ~ .tabbed-labels > :nth-child(1),
.tabbed-set input:nth-child(2):checked ~ .tabbed-labels > :nth-child(2),
.tabbed-set input:nth-child(3):checked ~ .tabbed-labels > :nth-child(3) {
color: deeppink;
box-shadow: 0 -4px 0 deeppink inset;
}
/* --- Tab content --- */
/* Inactive tab */
.tabbed-content div {
display: none;
}
/* Active tab */
.tabbed-set input:nth-child(1):checked ~ .tabbed-content > :nth-child(1),
.tabbed-set input:nth-child(2):checked ~ .tabbed-content > :nth-child(2),
.tabbed-set input:nth-child(3):checked ~ .tabbed-content > :nth-child(3) {
display: block;
padding: 10px;
}
</style>
</head>
<body>
<!-- Just for the demo -->
<input type="checkbox" id="limit" checked>
<label for="limit">Limit width of container</label>
<!-- The interesting stuff -->
<article>
<div class="tabbed-set" data-tabs="10:3">
<input id="__tabbed_10_1" name="__tabbed_10" type="radio" checked>
<input id="__tabbed_10_2" name="__tabbed_10" type="radio">
<input id="__tabbed_10_3" name="__tabbed_10" type="radio">
<div class="tabbed-labels">
<label for="__tabbed_10_1">A very long title</label>
<label for="__tabbed_10_2">Another very long title</label>
<label for="__tabbed_10_3">Well, why can't you just use shorter titles?</label>
</div>
<div class="tabbed-content">
<div><p>Some stuff</p></div>
<div><p>More stuff</p></div>
<div><p>Even more stuff</p></div>
</div>
</div>
</article>
<script>
const tabs = document.querySelectorAll(".tabbed-set > input")
for (const tab of tabs) {
tab.addEventListener("change", () => {
const label = document.querySelector(`label[for=${tab.id}]`)
label.scrollIntoView({ behavior: "smooth" })
})
}
</script>
</body>
</html>
Here's how it works:
input + label elements are targetted with :nth-child(...) selectors. While this seems unnecessarily bloated it is, AFAIK, the only viable approach. Furthermore, when transferred over the wire, it should compress very well, because the markup is largely the same, so gzip and friends should work very efficiently. We can provide, let's say, 10 selectors. That should be sufficient for 99.9% of all use cases. The CSS can be extended if more is necessary.The print view of Material for MkDocs currently just expands all tabs and renders them below each other. A possible solution for this could be to add the tabs' title as an attribute to the content element and use a pseudo-element to render a label before the content container. I haven't tested this thoroughly, but it might be a start:
HTML:
<div class="tabbed-content">
<div data-title="A very long title"><p>Some stuff</p></div>
...
</div>
CSS:
@media print {
.tabbed-content > ::before {
content: attr(data-title);
...
}
}
Downside: some duplicate HTML (i.e. the tabs title), but personally, I could live with that.
We definitely shouldn't start relying on JavaScript for this functionality. The current CSS-only solution is pretty awesome, because it works on slow connections and when the site is partly ready due to missing JavaScript. For a comparison, try Docusaurus's tabs implementation after disabling JavaScript - it doesn't work at all.
We might need to keep the old implementation for older clients for some time.
Any feedback is greatly appreciated. If you don't wish to go down this path for whatever reason, feel free to close this issue. I've had this on my mind for a long time and wanted to give it a shot and publish it to get some feedback and ideas. I don't expect this to land quickly, since there is some stuff to work out.
Also, if GitHub issues is not the right place to discuss, feel free to move this to a discussion.
T: feature S: needs-decisionThe generated source makes it impossible to style checkboxes with custom images or webfonts with pseudo elements, as they are not supported by the CSS specification on input elements.
Placing an empty label next to a checkbox makes this possible, see here: http://stackoverflow.com/questions/3772273/pure-css-checkbox-image-replacement
An empty label takes no space, as it is an inline element by default. Would be great if this would make it into master, because I would like to incorporate Material Design styled checkboxes into my MkDocs theme: https://github.com/squidfunk/mkdocs-material
My document uses relative paths (e.g. doc/file.html). I would like to create absolute paths with explicitly setting the scheme by specifying base_path = "file:///foo/bar".
https://github.com/facelessuser/pymdown-extensions/blob/e7320bf2a92b170b87af194ac1b0f26ed2809f31/pymdownx/pathconverter.py#L103
The following line returns file:/foo/bar/doc/file.html. Instead it should be /foo/bar/doc/file.html. You should also util.parse_url(base_path) and set scheme from base_path when it is not already set by m.group().
Hello there! The Python packaging ecosystem has standardized on the interface for build backends (PEP 517/PEP 660) and the format for metadata declaration (PEP 621/PEP 631). As a result, the use of setup.py files is now heavily discouraged.
So, I'm spending my free time updating important projects so that they are modernized and set an example for others 😄
This implements PEP 621, obviating the need for setup.py, setup.cfg, and MANIFEST.in. Support has not landed in setuptools, so builds will now use hatchling. It is quite stable and actively maintained, the only reason the version is 0.x is because 1.0.0 will drop support for Python 2. It's also on the major distribution channels such as conda-forge, Debian, Fedora, etc.
I've done this for such projects as pipx, all Datadog Agent integrations, etc.
hatch_build.py can be removed if you want things to be more staticCreate an operation mode which protects Math Blocks as in LaTeX.
Namely it should target advanced users who are aware of the edge cases.
It should work well when MathJaX is configured to handle only given elements and not scan the body for delimiters.
\( ... \) / \(...\).$ ... $ / $...$.\[ ... \] / \[...\].$$ ... $$ / $$...$$.Take care of cases there is line separating them. Something like:
$$
...
$$
\begin{envName} ... \end{envName} / \begin{envName}...\end{envName}\begin{envName}
...
\end{envName}
There is also the cases environment is embedded inside Display Math:
$$\begin{envName}
...
\end{envName}$$
Or
$$ \begin{envName}
...
\end{envName} $$
The Dollar Sign should be escaped: \$ as in LaTeX.
If needed, I can create an md file as a test case.
It would be nice to have support for mermaid: http://knsv.github.io/mermaid/.
Currently I have:
<div class="mermaid">
graph LR
A[Square Rect] -- Link text --> B((Circle))
A --> C(Round Rect)
B --> D{Rhombus}
C --> D
</div>
--8<-- "mermaid.md"
and:
cat docs/snippets/mermaid.md
<script src="https://cdn.rawgit.com/knsv/mermaid/7.0.0/dist/mermaid.min.js"></script>
<link href="https://cdn.rawgit.com/knsv/mermaid/7.0.0/dist/mermaid.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
<script>mermaid.initialize({startOnLoad:true});</script>
</script>
So it would be minimal impact to transform:
```mermaid
```
into:
<div class="mermaid">
</div>
I'd like a way to convert a :github_emoji: into the unicode character, instead of HTML <img> element. This doesn't seem very complicated given current code (I guess I can pull request if appropriate).
I was running a Lighthouse check on our website and realize this accessibility issue, I am using the tasklist extension.
The checkboxes do not have a label.
HTML (rendered + code):

Lighthouse report:

Idea being I can put it in one file like before:
(function () {
'use strict';
/**
* Targets special code or div blocks and converts them to UML.
* @param {object} converter is the object that transforms the text to UML.
* @param {string} className is the name of the class to target.
* @param {object} settings is the settings for converter.
* @return {void}
*/
var uml = (function (converter, className, settings) {
var getFromCode = function getFromCode(parent) {
// Handles <pre><code>
var text = "";
for (var j = 0; j < parent.childNodes.length; j++) {
var subEl = parent.childNodes[j];
if (subEl.tagName.toLowerCase() === "code") {
for (var k = 0; k < subEl.childNodes.length; k++) {
var child = subEl.childNodes[k];
var whitespace = /^\s*$/;
if (child.nodeName === "#text" && !whitespace.test(child.nodeValue)) {
text = child.nodeValue;
break;
}
}
}
}
return text;
};
var getFromDiv = function getFromDiv(parent) {
// Handles <div>
return parent.textContent || parent.innerText;
};
// Change body to whatever element your main Markdown content lives.
var body = document.querySelectorAll("body");
var blocks = document.querySelectorAll("pre." + className + ",div." + className
// Is there a settings object?
);var config = settings === void 0 ? {} : settings;
// Find the UML source element and get the text
for (var i = 0; i < blocks.length; i++) {
var parentEl = blocks[i];
var el = document.createElement("div");
el.className = className;
el.style.visibility = "hidden";
el.style.position = "absolute";
var text = parentEl.tagName.toLowerCase() === "pre" ? getFromCode(parentEl) : getFromDiv(parentEl);
// Insert our new div at the end of our content to get general
// typeset and page sizes as our parent might be `display:none`
// keeping us from getting the right sizes for our SVG.
// Our new div will be hidden via "visibility" and take no space
// via `position: absolute`. When we are all done, use the
// original node as a reference to insert our SVG back
// into the proper place, and then make our SVG visible again.
// Lastly, clean up the old node.
body[0].appendChild(el);
var diagram = converter.parse(text);
diagram.drawSVG(el, config);
el.style.visibility = "visible";
el.style.position = "static";
parentEl.parentNode.insertBefore(el, parentEl);
parentEl.parentNode.removeChild(parentEl);
}
});
(function () {
var onReady = function onReady(fn) {
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", fn);
} else {
document.attachEvent("onreadystatechange", function () {
if (document.readyState === "interactive") {
fn();
}
});
}
};
onReady(function () {
if (typeof flowchart !== "undefined") {
uml(flowchart, "uml-flowchart");
}
if (typeof Diagram !== "undefined") {
uml(Diagram, "uml-sequence-diagram", { theme: "simple" });
}
});
})();
}());
but now your loader imports uml from a 2nd file and I think that requires a JS build tool?
T: support C: docsCurrently, ids generated by Tabbed are of the form __tabbed_{tabset}_{tab}, e.g. __tabbed_1_2. Material for MkDocs allows to add anchor links to tabs, which means you can now explicitly link to tabs. However, this generates rather ugly and non-permalink URLs: https://squidfunk.github.io/mkdocs-material/getting-started/#__tabbed_1_2
Users asked whether the ids can be customized, and immediately the Attribute Lists extension popped up in my head. However, we probably don't need support for Attribute Lists, as the usage of a user-definable slug function would probably be enough. The slug function could be passed the contents of the tab label, and generate a readable anchor.
For example, with this Markdown:
=== "This is a label"
Content
The following id could be generated, which can be used as an anchor:
...
<input id="this-is-a-label" name="__tabbed_1" type="radio">
...
The Table of Contents extension also implements this, which is related, as it also generates anchor links. Configuration could possibly look like this:
markdown_extensions:
pymdownx.tabbed:
slugify: !!python/name:pymdownx.slugs.uslugify
And as a shortcut defaulting to the standard Markdown slugify function:
markdown_extensions:
pymdownx.tabbed:
slugify: true
T: feature
Expose the language name used in code block as css class.
Our use-case is doing some client-side processing of mermaid js code blocks, where it would be useful to have access to this information in the rendered output.
C: docs C: highlight C: inlinehilite C: superfences S: needs-review C: tests C: sourceBumps @primer/octicons from 17.10.0 to 17.10.1.
Sourced from @primer/octicons's releases.
v17.10.1
Patch Changes
#882
503bafb9Thanks@manuelpuyol! - Use parameter defaults instead of defaultProps#883
8a039a7bThanks@eliperkins! - Remove fill-rule from SVGs using picosvg as an optimization step
Sourced from @primer/octicons's changelog.
17.10.1
Patch Changes
- #882
503bafb9Thanks@manuelpuyol! - Use parameter defaults instead of defaultProps
- #883
8a039a7bThanks@eliperkins! - Remove fill-rule from SVGs using picosvg as an optimization step
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase will rebase this PR@dependabot recreate will recreate this PR, overwriting any edits that have been made to it@dependabot merge will merge this PR after your CI passes on it@dependabot squash and merge will squash and merge this PR after your CI passes on it@dependabot cancel merge will cancel a previously requested merge and block automerging@dependabot reopen will reopen this PR if it is closed@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bumps rollup from 3.7.5 to 3.9.1.
Sourced from rollup's releases.
v3.9.1
3.9.1
2023-01-02
Bug Fixes
- Sort keys in generated dynamic namespace objects (#4780)
- Do not consider Array.group to be side effect free as the specs have changed (#4779)
Pull Requests
- #4777: Import from node:fs/promises (
@dnalborczyk)- #4778: Bump deps (
@dnalborczyk)- #4779: Remove array grouping (web compat issue) (
@dnalborczyk)- #4780: Sort namespace object keys (
@dnalborczyk)- #4781: Use Set and builtin-modules package (
@dnalborczyk)- #4782: Use more restrictive types (
@dnalborczyk)v3.9.0
3.9.0
2022-12-28
Features
- Support ES2022 arbitrary module namespace identifiers (#4770)
- Add optional
versionproperty to plugin type (#4771)Pull Requests
- #4768: Fix small typo in 999-big-list-of-options.md (
@ericmutta)- #4769: docs: add a instruction about how to run one test on your local computer (
@TrickyPi)- #4770: Add support for arbitrary module namespace identifiers (
@lukastaegert)- #4771: Add
versionproperty to Plugin type (@Septh)v3.8.1
3.8.1
2022-12-23
Bug Fixes
- Reduce memory footprint when explicitly passing
cache: false(#4762)- Fix a crash when preserving modules and reexporting namespaces (#4766)
Pull Requests
- #4762: Improve AST garbage collection (
@bluwy)- #4766: Fix handling of namespace reexports when preserving modules (
@lukastaegert)
... (truncated)
Sourced from rollup's changelog.
3.9.1
2023-01-02
Bug Fixes
- Sort keys in generated dynamic namespace objects (#4780)
- Do not consider Array.group to be side effect free as the specs have changed (#4779)
Pull Requests
- #4777: Import from node:fs/promises (
@dnalborczyk)- #4778: Bump deps (
@dnalborczyk)- #4779: Remove array grouping (web compat issue) (
@dnalborczyk)- #4780: Sort namespace object keys (
@dnalborczyk)- #4781: Use Set and builtin-modules package (
@dnalborczyk)- #4782: Use more restrictive types (
@dnalborczyk)3.9.0
2022-12-28
Features
- Support ES2022 arbitrary module namespace identifiers (#4770)
- Add optional
versionproperty to plugin type (#4771)Pull Requests
- #4768: Fix small typo in 999-big-list-of-options.md (
@ericmutta)- #4769: docs: add a instruction about how to run one test on your local computer (
@TrickyPi)- #4770: Add support for arbitrary module namespace identifiers (
@lukastaegert)- #4771: Add
versionproperty to Plugin type (@Septh)3.8.1
2022-12-23
Bug Fixes
- Reduce memory footprint when explicitly passing
cache: false(#4762)- Fix a crash when preserving modules and reexporting namespaces (#4766)
Pull Requests
- #4762: Improve AST garbage collection (
@bluwy)- #4766: Fix handling of namespace reexports when preserving modules (
@lukastaegert)3.8.0
... (truncated)
dce233b 3.9.1c6c8844 Use more restrictive types (#4782)023ed0f Use Set and builtin-modules package (#4781)f00b251 Sort namespace object keys (#4780)08b61f5 Remove array grouping (web compat issue) (#4779)bceb353 Import from node:fs/promises (#4777)e026801 Bump deps (#4778)87f2027 3.9.05aa1cce Add support for arbitrary module namespace identifiers (#4770)57fa7e0 Add version property to Plugin type (#4771)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase will rebase this PR@dependabot recreate will recreate this PR, overwriting any edits that have been made to it@dependabot merge will merge this PR after your CI passes on it@dependabot squash and merge will squash and merge this PR after your CI passes on it@dependabot cancel merge will cancel a previously requested merge and block automerging@dependabot reopen will reopen this PR if it is closed@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Thanks for maintaining these extensions! I have a question about autolinking commit IDs with the MagicLink extension.
I'm aware that MagicLink already supports autolinking the full 40 character commit IDs (SHAs). It recognizes these commit IDs with regexes:
https://github.com/facelessuser/pymdown-extensions/blob/25508d4ea52b46c028b37a3cef09555d4f61a876/pymdownx/magiclink.py#L118-L122
MagicLink converts these full commit IDs into an abbreviated format. The length of these abbreviated commit IDs is the first 7 characters on GitHub and BitBucket, and the first 8 characters on GitLab, as shown in each hash_size item in the PROVIDER_INFO dictionary constant.
https://github.com/facelessuser/pymdown-extensions/blob/25508d4ea52b46c028b37a3cef09555d4f61a876/pymdownx/magiclink.py#L215
https://github.com/facelessuser/pymdown-extensions/blob/25508d4ea52b46c028b37a3cef09555d4f61a876/pymdownx/magiclink.py#L436-L439
So, MagicLink creates links from 40 character commit IDs. Could MagicLink also create links from abbreviated commit IDs?
Users would be able to link to individual commits by specifying abbreviated commit IDs, which would be helpful when creating changelogs.
The autolinking behavior of MagicLink would more closely match the behavior of platforms like GitHub. For example, GitHub will autolink the commit ID below, even though it's only the first 7 characters 25508d4:
25508d4
And note that the full commit ID is not needed to construct the link. Navigating to https://github.com/facelessuser/pymdown-extensions/commit/25508d4 points to the same commit.
Autolink abbreviated commit IDs, based on the provider:, user:, and repo: settings passed in.
Using the example above, and the following options:
provider: 'github' (the default)user: facelessuserrepo: pymdown-extensionsrepo_url_shorthand: TrueMagicLink would transform 25508d4 into https://github.com/facelessuser/pymdown-extensions/commit/25508d4.
It seems to me that the main challenge would be parsing the abbreviated commit ID.
It's more challenging than the full 40 character ID, because there are few words that are 40 characters, but many more words that are 7 characters, so there's a risk of false positives. Because of the risk of false positives, I would recommend disabling autolinking of abbreviated commit IDs by default, and offering a Boolean configuration option to enable it. Maybe something like link_abbreviated_commit_ids.
Bumps eslint from 8.30.0 to 8.31.0.
Sourced from eslint's releases.
v8.31.0
Features
52c7c73feat: check assignment patterns in no-underscore-dangle (#16693) (Milos Djermanovic)b401cdefeat: add options to check destructuring in no-underscore-dangle (#16006) (Morten Kaltoft)30d0daffeat: group properties with values in parentheses inkey-spacing(#16677) (Francesco Trotta)Bug Fixes
35439f1fix: correct syntax error inprefer-arrow-callbackautofix (#16722) (Francesco Trotta)87b2470fix: new instance of FlatESLint should load latest config file version (#16608) (Milos Djermanovic)Documentation
4339dc4docs: Update README (GitHub Actions Bot)4e4049cdocs: optimize code block structure (#16669) (Sam Chen)54a7adedocs: do not escape code blocks of formatters examples (#16719) (Sam Chen)e5ecfefdocs: Add function call example for no-undefined (#16712) (Elliot Huffman)a3262f0docs: Add mastodon link (#16638) (Amaresh S M)a14ccf9docs: clarify files property (#16709) (Sam Chen)3b29eb1docs: fix npm link (#16710) (Abdullah Osama)a638673docs: fix search bar focus onEsc(#16700) (Shanmughapriyan S)f62b722docs: country flag missing in windows (#16698) (Shanmughapriyan S)4d27ec6docs: display zh-hans in the docs language switcher (#16686) (Percy Ma)8bda20edocs: remove manually maintained anchors (#16685) (Percy Ma)b68440fdocs: User Guide Getting Started expansion (#16596) (Ben Perlmutter)Chores
65d4e24chore: Upgrade@eslint/eslintrc@1.4.1 (#16729) (Brandon Mills)8d93081chore: fix CI failure (#16721) (Sam Chen)8f17247chore: Set up automatic updating of README (#16717) (Nicholas C. Zakas)4cd87cbci: bump actions/stale from 6 to 7 (#16713) (dependabot[bot])fd20c75chore: sort package.json scripts in alphabetical order (#16705) (Darius Dzien)10a5c78chore: update ignore patterns ineslint.config.js(#16678) (Milos Djermanovic)
Sourced from eslint's changelog.
v8.31.0 - December 31, 2022
65d4e24chore: Upgrade@eslint/eslintrc@1.4.1 (#16729) (Brandon Mills)35439f1fix: correct syntax error inprefer-arrow-callbackautofix (#16722) (Francesco Trotta)87b2470fix: new instance of FlatESLint should load latest config file version (#16608) (Milos Djermanovic)8d93081chore: fix CI failure (#16721) (Sam Chen)4339dc4docs: Update README (GitHub Actions Bot)8f17247chore: Set up automatic updating of README (#16717) (Nicholas C. Zakas)4e4049cdocs: optimize code block structure (#16669) (Sam Chen)54a7adedocs: do not escape code blocks of formatters examples (#16719) (Sam Chen)52c7c73feat: check assignment patterns in no-underscore-dangle (#16693) (Milos Djermanovic)e5ecfefdocs: Add function call example for no-undefined (#16712) (Elliot Huffman)a3262f0docs: Add mastodon link (#16638) (Amaresh S M)4cd87cbci: bump actions/stale from 6 to 7 (#16713) (dependabot[bot])a14ccf9docs: clarify files property (#16709) (Sam Chen)3b29eb1docs: fix npm link (#16710) (Abdullah Osama)fd20c75chore: sort package.json scripts in alphabetical order (#16705) (Darius Dzien)a638673docs: fix search bar focus onEsc(#16700) (Shanmughapriyan S)f62b722docs: country flag missing in windows (#16698) (Shanmughapriyan S)4d27ec6docs: display zh-hans in the docs language switcher (#16686) (Percy Ma)8bda20edocs: remove manually maintained anchors (#16685) (Percy Ma)b401cdefeat: add options to check destructuring in no-underscore-dangle (#16006) (Morten Kaltoft)b68440fdocs: User Guide Getting Started expansion (#16596) (Ben Perlmutter)30d0daffeat: group properties with values in parentheses inkey-spacing(#16677) (Francesco Trotta)10a5c78chore: update ignore patterns ineslint.config.js(#16678) (Milos Djermanovic)
d9a39c7 8.31.05d182ce Build: changelog update for 8.31.065d4e24 chore: Upgrade @eslint/eslintrc@1.4.1 (#16729)35439f1 fix: correct syntax error in prefer-arrow-callback autofix (#16722)87b2470 fix: new instance of FlatESLint should load latest config file version (#16608)8d93081 chore: fix CI failure (#16721)4339dc4 docs: Update README8f17247 chore: Set up automatic updating of README (#16717)4e4049c docs: optimize code block structure (#16669)54a7ade docs: do not escape code blocks of formatters examples (#16719)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase will rebase this PR@dependabot recreate will recreate this PR, overwriting any edits that have been made to it@dependabot merge will merge this PR after your CI passes on it@dependabot squash and merge will squash and merge this PR after your CI passes on it@dependabot cancel merge will cancel a previously requested merge and block automerging@dependabot reopen will reopen this PR if it is closed@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bumps stylelint from 14.16.0 to 14.16.1.
Sourced from stylelint's releases.
14.16.1
- Fixed:
customSyntaxresolution withconfigBasedir(#6536) (@ybiquitous).- Fixed:
declaration-block-no-duplicate-propertiesautofix for!important(#6528) (@sidx1024).- Fixed:
function-no-unknownfalse positives forscroll,-webkit-gradient,color-stop,from, andto(#6539) (@Mouvedia).- Fixed:
value-keyword-casefalse positives for mixed caseignoreFunctionsoption (#6517) (@kimulaco).- Fixed: unexpected
outputin Node.js API lint result when any rule containsdisableFix: true(#6543) (@adrianjost).
Sourced from stylelint's changelog.
14.16.1
- Fixed:
customSyntaxresolution withconfigBasedir(#6536) (@ybiquitous).- Fixed:
declaration-block-no-duplicate-propertiesautofix for!important(#6528) (@sidx1024).- Fixed:
function-no-unknownfalse positives forscroll,-webkit-gradient,color-stop,from, andto(#6539) (@Mouvedia).- Fixed:
value-keyword-casefalse positives for mixed caseignoreFunctionsoption (#6517) (@kimulaco).- Fixed: unexpected
outputin Node.js API lint result when any rule containsdisableFix: true(#6543) (@adrianjost).
f1146c1 14.16.1493f562 Prepare release (#6518)121acce Refactor declaration-block-no-duplicate-properties (#6545)b165c0b Fix unexpected output in Node.js API lint result when any rule contains `di...c0db3fd Fix customSyntax resolution with configBasedir (#6536)cae5880 Add @linaria/postcss-linaria to list of compatible custom syntaxes (#6535)4d32d36 Fix function-no-unknown false positives for scroll, -webkit-gradient, `...dacd794 Fix declaration-block-no-duplicate-properties autofix for !important (#6528)e30ec86 Fix value-keyword-case false positives for mixed case ignoreFunctions opt...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase will rebase this PR@dependabot recreate will recreate this PR, overwriting any edits that have been made to it@dependabot merge will merge this PR after your CI passes on it@dependabot squash and merge will squash and merge this PR after your CI passes on it@dependabot cancel merge will cancel a previously requested merge and block automerging@dependabot reopen will reopen this PR if it is closed@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)yaml_indent to control whether per-block YAML configs use indentation or a
leading special character: / for /// syntax and : for ::: syntax (colon_syntax must be true to use :::
syntax)./ character can be escaped when registering the blocks extension.* or _ surrounded by whitespace are not considered as a token.^^ nested between ^ would be handled in an unexpected way.^ surrounded by whitespace are not considered as a token.~~ nested between ~ would be handled in an unexpected way.~ surrounded by whitespace are not considered a token.= surrounded by whitespace are not considered a token.** nested between * would be handled in an unexpected way.guess_lang
option (e.g. block vs inline).;.InlineHiliteException.check_paths is enabled), all other errors
will be propagated up.SnippetMissingError instead of IOError.file:// prefix on absolute paths.extend_pygments_lang is not case sensitive regarding language names.pygments_lang_option to enable attaching language classes to Pygments code blocks.SuperFencesException.power and fingerprint keys.linenums is enabled globally via the highlight extension, and a code block specifies a line
number of zero (e.g. SuperFences), disable line numbers for that code block.auto_append feature that was added in 8.2.attr_list is enabled, attributes were not properly added to Pygments code blocks in the
table format. (#1505)Please see Migration Notes for details on upgrading to 9.0.
arithmatex class added just like
everywhere else.:man_in_santa_hat: and :mx_claus: backwards -- same for :mrs_claus: and :woman_in_santa_hat:. That is on
Twitter's side, not ours.linespans.lineanchors.anchorlinenos.legacy_no_wrap_code option.auto_title option. If a specific name is not preferred, these names can be overridden via
a user defined mapping called auto_title_map.title option in a fenced code
header.data- attributes on Pygments code blocks. The latter requires
the attr_list extension to be enabled.highlight_code which no longer did anything.slugify function that aims to replace all other slugify methods. Deprecate
uslugify, uslugify_encoded, uslugify_case, uslugify_case_encoded, gfm, and gfm_encoded. slugify takes
parameters returning a function that performs the desired slug handling. slugify adds new options case="fold" for
case folding and normalize='<normalize format here>' (uses NFC by default).pymdownx-inline. Lines not
showing a line number would not render with the proper leading space.?<num> to link discussions. Full
discussion links will also be shortened if shortening is enabled. (#1187)normalize_issue_symbols option to make issues, pull request, and discussion links all
render with # instead of #, !, and ? respectively. Input syntax is still the same. Great if you want a GitHub
style look where all issue types are just rendered with #.pymdownx-inline an Pygments 2.7+.Please see Release Notes for details on upgrading to 8.0.
key= (no value). Only keys with values or keys with no value and no = are accepted. Keys with no value will now assume the value to be the key name.attr_list extension is enabled, fenced code that use brace attribute list style headers (```{lang #id .class attr=value}) will attach arbitrary attributes that are included in the header to the code element.linenums) included in fenced code headers no longer do anything. If attr_list is enabled, and the brace header is used, such options will be treated as HTML attributes. JavaScript highlighter options should be defined in the brace header form with attr_list enabled in order to generate appropriate, compatible HTML with the chosen JavaScript highlighter.legacy_tab_classes option has been removed. Please use the Tabbed extension to create general purpose tabs for code blocks or other content.language_prefix which controls the prefix applied to language classes when Pygments is not being used.code_attr_on_pre was added to the Highlight extension and controls whether language classes, and any ids, attributes, and classes that are defined in fenced code attribute list style headers, are attached to the code element or pre element. This has effect when using Pygments.linenums now defaults to None and accepts None, True, or False. None is disabled by default, but can be enabled per code block. True enables line numbers globally. False disables globally and cannot be enabled manually per code block.hl_lines option. (#878)options and md argument. The old non-argument format is deprecated and still accepted, but support for indexes with no arguments will be removed at a future time.#!tex $$..$$ and #!tex begin{}...end{} patterns properly don't match if the tail markers are escaped.Please see Release Notes for details on upgrading to 7.0.
social_url_shortener and shortener_user_exclude were added.``` {.lang .additional_class, linenums="1"}) allows
adding additional classes. IDs can be added as well, though Pygments generated code blocks do not have a mechanism to
actually insert IDs. The first provided class will always be treated as the language class.classes and id_value to
allow injecting classes and IDs via the now supported attribute list format. If a code block defines no additional IDs
and classes, the old form will be used. Formatters should include **kwargs at the end to future proof them from
future changes.highight_code option. As SuperFences syntax has language classes built right in,
disabling the highlight_code option makes little sense. While highlight_code is still accepted, it currently does
nothing and will be removed at some future time.*, it will override the
default fence logic.supferfences-tabs and superfences-content to
tabbed-set and tabbed-content respectively. Old style classes can be enabled with the legacy_tab_classes option
in SuperFences. This new option will be retired with SuperFences tabbed content feature in 8.0.super, left-super, and right-super key codes as an alternative to meta. Aliases lsuper and
rsuper were also added.alt-graph key code with altgr alias.lwindows and rwindows for consistency.left-meta and right-meta for consistency with other modifiers. Aliases lmeta and rmeta
were also added.left-option, right-option, left-command, right-command, left-meta, and right-meta codes for
consistency across similar modifier keys. Additional aliases were added as well: loption, roption, lopt,
ropt, left-opt, right-opt, lcommand, rcommand, lcmd, rcmd, left-cmd, right-cmd, lmeta, and
rmeta.alt no longer uses menu, lmenu, and rmenu as key aliases. context-menu now uses the alias menu.
context-menu will display with Menu now.Please see Release Notes for details on upgrading to 7.0.
social_url_shortener and shortener_user_exclude were added.``` {.lang .additional_class, linenums="1"}) allows
adding additional classes. IDs can be added as well, though Pygments generated code blocks do not have a mechanism to
actually insert IDs. The first provided class will always be treated as the language class.classes and id_value to
allow injecting classes and IDs via the now supported attribute list format. If a code block defines no additional IDs
and classes, the old form will be used. Formatters should include **kwargs at the end to future proof them from
future changes.highight_code option. As SuperFences syntax has language classes built right in,
disabling the highlight_code option makes little sense. While highlight_code is still accepted, it currently does
nothing and will be removed at some future time.*, it will override the
default fence logic.supferfences-tabs and superfences-content to
tabbed-set and tabbed-content respectively. Old style classes can be enabled with the legacy_tab_classes option
in SuperFences. This new option will be retired with SuperFences tabbed content feature in 8.0.super, left-super, and right-super key codes as an alternative to meta. Aliases lsuper and
rsuper were also added.alt-graph key code with altgr alias.lwindows and rwindows for consistency.left-meta and right-meta for consistency with other modifiers. Aliases lmeta and rmeta
were also added.left-option, right-option, left-command, right-command, left-meta, and right-meta codes for
consistency across similar modifier keys. Additional aliases were added as well: loption, roption, lopt,
ropt, left-opt, right-opt, lcommand, rcommand, lcmd, rcmd, left-cmd, right-cmd, lmeta, and
rmeta.alt no longer uses menu, lmenu, and rmenu as key aliases. context-menu now uses the alias menu.
context-menu will display with Menu now.``` {.lang .additional_class, linenums="1"}) allows
adding additional classes. IDs can be added as well, though Pygments generated code blocks do not have a mechanism to actually insert IDs. The first provided class will always be treated as the language class.classes and id_value to allow injecting classes and IDs via the now supported attribute list format. If a code block defines no additional IDs and classes, the old form will be used. Formatters should include **kwargs at the end to future proof them from future changes.highight_code option. As SuperFences syntax has language classes built right in, disabling the highlight_code option makes little sense. While highlight_code is still accepted, it currently does nothing and will be removed at some future time.*, it will override the
default fence logic.supferfences-tabs and superfences-content to tabbed-set and tabbed-content respectively. Old style classes can be enabled with the legacy_tab_classes option in SuperFences. This new option will be retired with SuperFences tabbed content feature in 8.0.super, left-super, and right-super key codes as an alternative to meta. Aliases lsuper and
rsuper were also added.alt-graph key code with altgr alias.lwindows and rwindows for consistency.left-meta and right-meta for consistency with other modifiers. Aliases lmeta and rmeta were also added.left-option, right-option, left-command, right-command, left-meta, and right-meta codes for consistency across similar modifier keys. Additional aliases were added as well: loption, roption, lopt, ropt, left-opt, right-opt, lcommand, rcommand, lcmd, rcmd, left-cmd, right-cmd, lmeta, and rmeta.alt no longer uses menu, lmenu, and rmenu as key aliases. context-menu now uses the alias menu. context-menu will display with Menu now.Please see Release Notes for details on upgrading to 7.0.
``` {.lang .additional_class, linenums="1"}) allows
adding additional classes. IDs can be added as well, though Pygments generated code blocks do not have a mechanism to actually insert IDs. The first provided class will always be treated as the language class.classes and id_value to allow injecting classes and IDs via the now supported attribute list format. If a code block defines no additional IDs and classes, the old form will be used. Formatters should include **kwargs at the end to future proof them from future changes.highight_code option. As SuperFences syntax has language classes built right in, disabling the highlight_code option makes little sense. While highlight_code is still accepted, it currently does nothing and will be removed at some future time.*, it will override the
default fence logic.- NEW: SuperFences and InlineHilite no longer sync settings from CodeHilite.supferfences-tabs and superfences-content to
tabbed-set and tabbed-content respectively. Old style classes can be enabled with the legacy_tab_classes option
in SuperFences. This new option will be retired with SuperFences tabbed content feature in 8.0.0.pymdownx.extrarawhtml is now deprecated in favor of Python Markdown's md_in_html extension found in the
3.2 release.pre elements will also be wrapped in code blocks:
#!html <pre><code></code></pre>. legacy_no_wrap_code option has been provided as a temporary way to get the old
behavior during the transition period, the option will be removed in the future.version and version_info.to_awesome generator for EmojiOne.version and version_info are now accessible via the more standard form __version__ and _version_info__. The old format, while available, is now deprecated.# would trigger MagicLink's shorthand for issues.**Strong*em,strong***.Please see Release Notes in documentation for details on upgrading to 6.0.0.
flow and sequence as default custom fences. Users will need to configure them themselves.linenums_special option to Highlight extension. Can be overridden per fence in SuperFences. (#360)linenums_style option to set line number output to Pygments table or inline format. Also provide a custom pymdownx-inline format for more sane inline output in regards to copy and paste. See Highlight documentation for more info. (#360)insert_as_script and deprecated MagicLink option base_repo_url.step values. (#360)preserve_tabs option in SuperFences. (#328)yuque2md 按照语雀知识库里的目录,导出语雀知识库中所有的markdown文档,并离线图片到本地 使用 安装 Python3.x clone 项目 下载依
Introducing Pepys: A straightforward markdown journal "It is rightly made for those who love to document their daily life events" - FOSSBytes Pepys is
A markdown lexer and parser which gives the programmer atomic control over markdown parsing to html.
Markdown-Include This is an extension to Python-Markdown which provides an "include" function, similar to that found in LaTeX (and also the C pre-proc
Rich CLI Rich-cli is a command line toolbox for fancy output in the terminal, built with Rich. Rich-cli can syntax highlight a large number of file ty
Livermark This software is in the early stages and is not well-tested Livemark is a static site generator that extends Markdown with interactive chart
Pure Python web server - PyProject A blogging platform written in pure python (n
mdut mdut (pronounced "em-doot") is a tool for generating Markdown URL tags. It
Toci is a markdown tool to generate an outline from a given Jupyter notebook. It traverses the markdown cells of a given ipynb file to form a toc for you.
Django MarkdownX Django MarkdownX is a comprehensive Markdown plugin built for Django, the renowned high-level Python web framework, with flexibility,
inkpot a small simple library for generating documentation from docstrings inkpot is available on pip. Please give it a star if you like it! To know m
LeidenMark $ pip install leidenmark A Python Markdown extension for converting Leiden+ epigraphic text to TEI XML/HTML. Inspired by the Brill plain te
March 1, 2021: Service on gitpitch.com has been shutdown permanently. GitPitch 4.0 Docs Twitter About Watch the Introducing GitPitch 4.0 Video Visit t
Markdown is a light text markup format and a processor to convert that to HTML. The originator describes it as follows: Markdown is a text-to-HTML con
Python-Markdown This is a Python implementation of John Gruber's Markdown. It is almost completely compliant with the reference implementation, though
A lightweight and fast-to-use Markdown document generator based on Python
Markdown List Reader A simple tool for reading lists in markdown. Usage Begin by running the mdr.py file and input either a markdown string with the -
Grip -- GitHub Readme Instant Preview Render local readme files before sending off to GitHub. Grip is a command-line server application written in Pyt
DocsGen-py A markdown template manager for writing API docs in python. Contents Usage API Reference Usage You can install the latest commit of this re
Markdown to PDF Bot A discord bot that accepts markdown files (or messages) and displays them as images. Prerequisite To install, you must have have :