Is there a way to use either Redcarpet or Bluecloth such that when it interpolates the markdown it won’t make any headers?
For example:
#header 1
yields:
header 1
header 1 (preferred)
And:
##header 2
yields:
header 2
header 2 (preferred)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, you can escape characters in Markdown:
…gives:
If you don’t want to have to do this, or you’re parsing other people’s Markdown and don’t have a choice, I would recommend pre-processing the incoming Markdown to do the above for you:
Using Redcarpet you can verify that it works:
Of course since a line break in HTML doesn’t actually render as such–it will appear as one line:
…you might want to augment that:
This last would appear as:
Unfortunately you eventually get into weird territory like this, where a heading is inside a quote:
…but I leave that as an exercise to the reader.