Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I escape the markdown parser for certain pieces of text?

I'm using textile to generate HTML for a specific page and in the copy, there is a need for (c) to be generated without the copyright symbol. Unfortunately, textile always does it.

Is there a way in textile to escape the parsing it does to change it (I know I could put spaces on either side of the "c," but that doesn't look nice)?

like image 514
jfedick Avatar asked Oct 26 '11 16:10

jfedick


People also ask

How do you escape text in Markdown?

In Markdown, you can escape various characters using a backslash ( \ ), so if you wanted to type C#, you would use C\# .

What does backslash mean in markdown?

Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax.

How do you write special characters in markdown?

5.2 Special characters If you want any special characters in R Markdown, LaTeX, or pandoc to appear as text, rather than having them perform some function, you need to “escape” them with a backslash. For example, pound signs/hashtags, backslashes, and dollar signs need to be preceded by a backslash.

What is a markdown parser?

A markdown parser is a library (a or some scripts) that are going to parse, in this case, markdown. Markdown is often transformed into HTML . So, a markdown parser transforms markdown into html. So, with a markdown parser, you'd just have to do something like this: html = parseMarkdown(markdown_code) And you're done.


2 Answers

Using the <notextile></notextile> tags in the markdown will cause the parser to skip whatever is between those two tags. RedCloth docs

like image 177
jfedick Avatar answered Sep 28 '22 05:09

jfedick


Also using &#40;c) will yield (c) rather than ©.

like image 30
Tyler Rinker Avatar answered Sep 28 '22 04:09

Tyler Rinker