Har
Har

Reputation: 3918

Markdown: Is there a way to specify raw text in markdown?

I am using python to generated markdown, is there a way to specify a "raw" string in markdown terms?

i.e.

<-- magic markdown formatting to indicate not to format the following text
# This is a comment

--- end of text ---
<-- end of magic markdown formatting

Should appear as is without letting markdown touch it at all.

Upvotes: 3

Views: 6016

Answers (1)

AbdealiLoKo
AbdealiLoKo

Reputation: 3337

If you want to add comments, you could use the syntax for code.

In github flavoured markdown it normally uses ``` (3 backticks)
In the python-markdown it is like Stack overflow, where you put 4 spaces in front of the line.

if you do not want to format it like code, you can simply escape the markdown syntax like :

\# comment

Will display # comment rather than the word "comment" as a heading.

Upvotes: 4

Related Questions