Browse Source

support for blank line after opening <div tag allowing markdown processing (should there be other tags here?)

pull/67/head
adam j hartz 1 month ago
parent
commit
d9d02b9801
Signed by: hz <hartz@mit.edu> GPG Key ID: 5FDD2840E179AD62
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      catsoop/language.py

+ 3
- 0
catsoop/language.py View File

@@ -199,6 +199,7 @@ def _md(x):
o = markdown.markdown(
x,
extensions=[
"extra",
tables.TableExtension(),
fenced_code.FencedCodeExtension(),
sane_lists.SaneListExtension(),
@@ -228,6 +229,8 @@ def md_pre_handle(context, xml=True):

text = re.sub(_environment_matcher("comment"), "", text)

text = re.sub(r"<div([^>]*)>\n\s*?\n", r"<div\1 markdown>\n\n", text)

text = _md_format_string(context, text, False)

context["cs_content"] = text


Loading…
Cancel
Save