MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / _markdown_to_html

Function _markdown_to_html

scripts/website/queue_browser_syndication.py:86–92  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

84
85
86def _markdown_to_html(text: str) -> str:
87 try:
88 import markdown as _md
89 except ImportError:
90 from html import escape as _esc
91 return f"<pre>{_esc(text)}</pre>"
92 return _md.markdown(text, extensions=["extra", "fenced_code", "sane_lists"], output_format="html5")
93
94
95def _eligible_posts(today: dt.date, floor: dt.date, min_age_days: int, blog_dir: Path) -> list[Post]:

Callers 1

_build_taskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected