From ac3da922858d7a5f94a9b62af598f678aac22989 Mon Sep 17 00:00:00 2001 From: Qrius Date: Mon, 19 May 2025 09:22:11 +0200 Subject: Add dependency for checklists in markdown --- debian/control | 2 +- pyproject.toml | 2 +- src/smp/builtins.py | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index d7d8c3e..a2566be 100644 --- a/debian/control +++ b/debian/control @@ -8,5 +8,5 @@ Rules-Requires-Root: no Package: skaldpress Architecture: any -Depends: python3, python3-markdown-it +Depends: python3, python3-markdown-it python3-mdit-py-plugins Description: Skaldpress diff --git a/pyproject.toml b/pyproject.toml index 88737b4..6a1ccfb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3 :: Only", ] -dependencies = ["markdown-it-py"] +dependencies = ["markdown-it-py", "mdit-py-plugins"] [project.optional-dependencies] dev = ["check-manifest", "black", "pyflakes", "mypy", "types-Markdown", "pyinstrument"] diff --git a/src/smp/builtins.py b/src/smp/builtins.py index 6beb224..00d002b 100644 --- a/src/smp/builtins.py +++ b/src/smp/builtins.py @@ -6,6 +6,7 @@ import urllib.error import urllib.parse import datetime from markdown_it import MarkdownIt +from mdit_py_plugins import tasklists_plugin from skaldpress.metadata_parser import extract_parse_yaml_metadata from typing import Any @@ -187,6 +188,8 @@ def smp_builtin_html_from_markdown(macro_processor, text, extensions=list()): MarkdownIt("commonmark", {"breaks": False, "html": True}) .enable("table") .enable("list") + .enable("strikethrough") + .enable(tasklists_plugin) ) for extension in extensions: -- cgit v1.2.3