mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 19:02:09 +00:00
Changelog: https://github.com/Python-Markdown/markdown/blob/master/docs/change_log/release-3.10.md Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
24 lines
473 B
Bash
Executable File
24 lines
473 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ "$1" = python3-markdown ] || exit 0
|
|
|
|
python3 - << 'EOF'
|
|
|
|
import markdown
|
|
|
|
# Basic conversion
|
|
result = markdown.markdown("# Hello World")
|
|
assert result == "<h1>Hello World</h1>", f"got: {result}"
|
|
|
|
# Bold and italic
|
|
result = markdown.markdown("**bold** and *italic*")
|
|
assert "<strong>bold</strong>" in result
|
|
assert "<em>italic</em>" in result
|
|
|
|
# List
|
|
result = markdown.markdown("- item1\n- item2")
|
|
assert "<ul>" in result
|
|
assert "<li>item1</li>" in result
|
|
|
|
EOF
|