Reputation: 4471
I would like to display a dollar sign inside a code span generated with maven-site-plugin and markdown (doxia-module-markdown).
Out of a code span, I used the numerical code $
and it fixed the issue.
But inside a code span (4 spaces), the numerical code is not decoded, which is actually not suprising :
Within a code block, ampersands (&) and angle brackets (< and >) are automatically converted into HTML entities.
(from http://daringfireball.net/projects/markdown/syntax#code)
I also tried to double the dollar sign ($$
), escape it (\$
), charm it (<3$
), but nothing worked!
Does someone have any idea?
Upvotes: 2
Views: 971
Reputation: 69339
You can use a raw dollar sign within a code block. There is even a small example of this in the doxia syntax page:
Blockquotes can contain other Markdown elements, including headers, lists, and code blocks:
> ## This is a header.
>
> 1. This is the first list item.
> 2. This is the second list item.
>
> Here's some example code:
>
> return shell_exec("echo $input | $markdown_script");
In the example above, the dollars are unescaped.
Upvotes: 0