Commit graph

3 commits

Author SHA1 Message Date
Ambroise Paré
6063398ece feat: add native markdown template filter
Add {{markdown:Field}} and {{md:Field}} template filters that convert
markdown syntax to HTML using the existing pulldown-cmark dependency.

Features:
- GFM tables support (| col1 | col2 |)
- Strikethrough (~~text~~)
- Task lists (- [ ] and - [x])
- Footnotes ([^1])
- Fenced code blocks with language hints
- Smart punctuation

Also adds {{markdown-inline:Field}} / {{md-inline:Field}} variants
that strip outer <p> tags for inline content.

The filter leverages Anki's existing pulldown-cmark 0.13.0 dependency,
requiring no new dependencies.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:14:46 +01:00
Damien Elmes
ded805b504
Switch Rust import style (#2330)
* Prepare to switch Rust import style

* Run nightly format

Closes #2320

* Clean up a few imports

* Enable comment wrapping

* Wrap comments
2023-01-18 21:39:55 +10:00
Damien Elmes
ded626f0b9 render deck description with markdown; strip images
To support images on that screen, we'll first need to adjust the base url
for each platform, or rewrite the local image URLs, as otherwise they
are resolved to _anki/pages/...
2021-02-06 15:02:40 +10:00