fixed markdown extensions
This commit is contained in:
parent
5f4370f953
commit
7f050afb8b
2 changed files with 2 additions and 3 deletions
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
## 0.7
|
## 0.7
|
||||||
|
|
||||||
+ XXX Custom Markdown extensions are broken with Markdown 3.4.1. While we find a workaround to it,
|
|
||||||
use the config `[markdown]disable_custom_extensions` set to 1.
|
|
||||||
+ Schema changes:
|
+ Schema changes:
|
||||||
+ Removed `PagePolicy` and `PagePolicyKey` tables altogether. They were never useful.
|
+ Removed `PagePolicy` and `PagePolicyKey` tables altogether. They were never useful.
|
||||||
+ Added `calendar` field to `Page`.
|
+ Added `calendar` field to `Page`.
|
||||||
|
|
@ -16,6 +14,7 @@
|
||||||
+ Now a page can be dated in the calendar.
|
+ Now a page can be dated in the calendar.
|
||||||
+ Now you can export and import pages in a JSON format. Importing can be done by admin users only.
|
+ Now you can export and import pages in a JSON format. Importing can be done by admin users only.
|
||||||
+ Improved page history view, and added user contributions page.
|
+ Improved page history view, and added user contributions page.
|
||||||
|
+ Updated Markdown extensions to work under latest version.
|
||||||
+ Like it or not, now gzip library is required.
|
+ Like it or not, now gzip library is required.
|
||||||
+ Added CSS variables in the site style.
|
+ Added CSS variables in the site style.
|
||||||
|
|
||||||
|
|
|
||||||
2
app.py
2
app.py
|
|
@ -97,7 +97,7 @@ def _makelist(l):
|
||||||
class StrikethroughExtension(markdown.extensions.Extension):
|
class StrikethroughExtension(markdown.extensions.Extension):
|
||||||
def extendMarkdown(self, md, md_globals=None):
|
def extendMarkdown(self, md, md_globals=None):
|
||||||
postprocessor = StrikethroughPostprocessor(md)
|
postprocessor = StrikethroughPostprocessor(md)
|
||||||
md.postprocessors.add('strikethrough', postprocessor, '>raw_html')
|
md.postprocessors.register(postprocessor, 'strikethrough', 0)
|
||||||
|
|
||||||
class StrikethroughPostprocessor(markdown.postprocessors.Postprocessor):
|
class StrikethroughPostprocessor(markdown.postprocessors.Postprocessor):
|
||||||
pattern = re.compile(r"~~(((?!~~).)+)~~", re.DOTALL)
|
pattern = re.compile(r"~~(((?!~~).)+)~~", re.DOTALL)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue