Overview
Allow users to get a publish URL that reflects the format they want, e.g. plain text or with rendered Markdown.
Background
Appending certain extensions to anonymous post URLs makes them render differently. E.g. .txt returns a full post as text/plain and .md renders Markdown in a post.
Overview Allow users to get a publish URL that reflects the format they want, e.g. plain text or with rendered Markdown.
Background Appending certain extensions to anonymous post URLs makes them render differently. E.g.
.txt
returns a full post astext/plain
and.md
renders Markdown in a post.Implementation Upon successfully publishing a new post, simply append the correct extension to the write.as URL based on flags given. Plain text URLs end in
.txt
, e.g. https://write.as/ql9ed0uc49pdp1qu.txt, and Markdown URLs end in.md
, e.g. https://write.as/ql9ed0uc49pdp1qu.mdCorrect solution
--format
flag (or a better name) that acceptsraw
ormd
/markdown
-- e.g.--format raw
Original solution
--raw
should return the post URL ending in.txt
--markdown
should return post URL ending in.md