Skip to content

Render markdown in sub-search descriptions #36

@PortableProgrammer

Description

@PortableProgrammer

Companion to #33 (HTMLdecode). Reddit's API returns both public_description (raw markdown) and public_description_html (rendered HTML) for subreddits. Sub-search currently shows the raw markdown, which is ugly for subs with formatting in their descriptions.

Where

src/views/sub-search.pug:37 renders #{i.data.public_description} directly.

Fix

Use i.data.public_description_html (with he.decode()) instead of public_description. Match the same pattern used for selftext rendering in posts.

Note

The subreddit's own page (/r/<sub>) also doesn't render markdown in the about block at src/views/index.pug:38 — consider whether to fix both in this issue, or split into a follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions