Render DText to the official spec

Checked against https://e621.net/help/dtext and filled the gaps:
- backtick inline code spans and backslash-backtick escaping
- [color=...] accepts tag category names (artist, copyright, species,
  ...) alongside CSS colour names and 3/6/8-digit hex
- links: <url> brackets, "title":[url], "title":/relative paths,
  wiki links with custom titles and #anchors, {{tag search}} and entity
  references (post/topic/pool/set/comment/... #id)
- [quote=red] colours the bar instead of being read as an author
- nested lists via repeated * / # markers
- [section,expanded=Title] renders expanded
- [table] thead/tr/th/td tables and [ltable] pipe tables
- [#anchor] targets and [[#anchor]] in-page links
- headings always start their own block
This commit is contained in:
2026-09-17 09:22:14 -05:00
parent 81939d8ca3
commit 8e2f5e3395
2 changed files with 479 additions and 251 deletions
@@ -308,7 +308,7 @@ export default function OnlineDetailPage() {
Description
</summary>
<div className="mt-2 text-sm leading-relaxed text-ctp-subtext0">
{renderDText(post.description)}
{renderDText(post.description, credentials?.base_url)}
</div>
</details>
</section>