r/Devvit • u/vanessabaxton • 9d ago
Duck Answered Bug: Wiki v2 (new Reddit) doesn't render Markdown for content written via reddit.updateWikiPage(), identical content renders fine under v1
EDIT
Turns out it works with HTML in the new wiki, however there's still a bug where you can't copy the text when in edit mode, but that's a reddit bug not a devvit one, so problem solved.
Devvit version: @devvit/public-api ^0.14.0 (Node 24 runtime)
What I did
Wrote the exact same Markdown content to the same wiki page path under both wiki versions, using reddit.updateWikiPage() / reddit.createWikiPage() with wikiVersion: "v1" and wikiVersion: "v2" respectively:
# Content
From this week's megathread: https://www.reddit.com/r/subreddit/comments/id/
22 question(s) with no replies:
- https://www.reddit.com/r/subreddit/comments/id/subject/id2/
- https://www.reddit.com/r/subreddit/comments/id3/subject/id4/
...
Expected
Both versions render the # heading and - bullet list as Markdown, same as if a human had typed this into the wiki editor directly.
Actual
v1 (viewed on old.reddit.com): renders correctly, real h1 heading, real bullet list, each URL auto-linked.
v2 (viewed on new Reddit / www.reddit.com): renders as one flat block of plain text. The # and - markers show up as literal characters, not parsed as Markdown, and the URLs aren't auto-linked. Same content, same write call shape, just wikiVersion swapped:
- old Reddit (v1): proper heading + bullet list + clickable links
- new Reddit (v2): "# Unanswered Questions From this week's Questions megathread: ... 22 question(s) with no replies: - https://... - https://..." all run together as unformatted text
Additionally, in the new-Reddit wiki edit mode for the v2 page, the content in the textarea doesn't behave like normal selectable/copyable text, I can't select-and-copy it out of the edit box the way I can on the old.reddit.com editor for the same page.
Impact
Any app that writes structured wiki content (headings, lists, links) via the Devvit API and targets wikiVersion: "v2" gets unusable, unformatted output on new Reddit, even though the identical content is correctly rendered under v1. This makes v2 wiki pages effectively unusable for anything beyond a single unformatted paragraph until this is fixed, and undermines the migration guidance to move apps onto v2.
Repro
1. Call reddit.updateWikiPage({ subredditName, page, content: "# Heading\n\n- item one\n- item two", wikiVersion: "v2" }) on a v2-enrolled subreddit.
2. View the page at www.reddit.com/r/<sub>/wiki/<page>.
3. Compare against the same call with wikiVersion: "v1", viewed at old.reddit.com/r/<sub>/wiki/<page>.
5
u/fsv Duck Helper 9d ago
My understanding (not played with it yet) is that the new wiki doesn't work using Markdown, but HTML. I'd create a page manually using the UI, retrieve it using Devvit, and then check the output.
There are converters from Markdown to HTML which I would be looking to use once I start adding New Wiki support to my apps.