New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mdformat breaks Hugo shortcodes by escaping <
#402
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
I agree this can be annoying. Also "[" and "]" are escaped - so I can't use this for Obsidian. I might make a PR so we're able to configure this behavior. |
I just want to add another case. I am using mkdocs with PyMarkdown Extension Snippets; useful for embedding content directly in your documentation pages. A document is included using the following syntax: --8<-- "filename.ext" mdformat changes it to: --8\<-- "filename.ext" The behavior does not happen inside a code block, the following code is not changed: \```yaml
--8<-- "filename.yml"
\``` (had to add the escape characters to display it kind of correctly, lol). |
GitHub blocks highlights are escaped too: https://github.com/orgs/community/discussions/16925 Changes: > [!NOTE]
> Test With: > \[!NOTE\] Test And changes: > **Note**
> This is a note With: > **Note** This is a note |
Any updates on this? |
remove because of executablebooks/mdformat#402
* mark jobs as failed on restart * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * test the startup db functions * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update README.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove mdformater remove because of executablebooks/mdformat#402 * Update README.md --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Fabian Zills <46721498+PythonFZ@users.noreply.github.com>
Describe the bug
context
Running
mdformat
on a Markdown file with a Hugo shortcode.expectation
I expected
mdformat
to not break the shortcode.bug
Instead
mdformat
is breaking the shortcode by escaping<
to\<
.problem
This breaks the shortcode for Hugo users.
Relevant Hugo comment: #112 (comment)
Reproduce the bug
That links to this YouTube video.
mdformat
corrects this to{{\< youtube -dJolYw8tnk >}}
List your environment
The text was updated successfully, but these errors were encountered: