mirror of
https://github.com/getpelican/pelican.git
synced 2026-07-13 02:24:31 +02:00
Merge 58a733676c into 3c69dc68d2
This commit is contained in:
commit
ccd84da85e
1 changed files with 7 additions and 0 deletions
|
|
@ -107,6 +107,13 @@ def decode_wp_content(content, br=True):
|
|||
|
||||
content = _multi_replace(pre_tags, content)
|
||||
|
||||
# SyntaxHighlighter plugin format (on WP this is quote forgiving)
|
||||
content = re.sub(
|
||||
r'<pre\s+class="[^>]*\bbrush\s*:\s*([\w#+-]+)[^>]*>',
|
||||
r'<pre class="sourceCode \1">',
|
||||
content,
|
||||
)
|
||||
|
||||
# convert [caption] tags into <figure>
|
||||
content = re.sub(
|
||||
r"\[caption(?:.*?)(?:caption=\"(.*?)\")?\]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue