Skip to content

Commit

Permalink
Ensure / can be escaped when blocks is registered
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Dec 17, 2022
1 parent cf43444 commit 88d9747
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/markdown/about/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- **NEW**: Add temporary alpha/beta option `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).
- **NEW**: Ensure that `/` character can be escaped when registering the `blocks` extension.
- **FIX**: Fix some block nesting issues.

## 9.10a1
Expand Down
2 changes: 2 additions & 0 deletions pymdownx/blocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from markdown import Extension
from markdown.blockprocessors import BlockProcessor
from markdown import util as mutil
from .. import util
import xml.etree.ElementTree as etree
import re
from .admonition import Admonition
Expand Down Expand Up @@ -480,6 +481,7 @@ def extendMarkdown(self, md):
"""Add Blocks to Markdown instance."""

md.registerExtension(self)
util.escape_chars(md, ['/'])

config = self.getConfigs()
self.extension = BlocksProcessor(md.parser, md, config)
Expand Down

0 comments on commit 88d9747

Please sign in to comment.