How do I escape naked markup characters like "*" and "+"?
_why_, I've also added a few new bug reports to the Rubyforge tracker.
Jim
···
--
Jim Menard, jimm@io.com, http://www.io.com/~jimm/
"333: Eric the Half A Beast" -- Tim Allen in rec.humor.oracle.d
Jim Menard writes:
How do I escape naked markup characters like "*" and "+"?
More information: a single character works as expected. For example, with the
input
This is * intersting.
the asterisk is output. But this
This is "*" interesting because I am talking about "*" characters.
outputs the text between the asterisks as bold. Is there any way to turn off
the meaning of "*", "+", etc. so that it does not start a region of marked up
text?
Another question: can I insert literal HTML characters like &42; (which is an
asterisk)?
Jim
···
--
Jim Menard, jimm@io.com, http://www.io.com/~jimm/
"An object at rest cannot be stopped!"
-- The Evil Midnight Bomber What Bombs At Midnight
Jim Menard wrote:
But this
This is "*" interesting because I am talking about "*" characters.
outputs the text between the asterisks as bold. Is there any way to turn off
the meaning of "*", "+", etc. so that it does not start a region of marked up
text?
For protecting short phrases from RedCloth's processor, surround with double equals signs.
in: ==This is "*" interesting because I am talking about "*" characters.==
out: This is "*" interesting because I am talking about "*" characters.
in: This *bold* but this is ==*asterisked*==.
out: This <strong>bold</strong> but this is *asterisked*.
If you have a large block of text you want protected, you can surround it with <notextile> tags. In addition, <pre> and <code> contents are protected from Textile formatting.
I'll clarify this in the reference @ Textile Reference
Another question: can I insert literal HTML characters like &42; (which is an
asterisk)?
You should be able to. Looks like this is broken (frown) but I will put this in the stack. Thanks for the bug report, Jim.
_why
If you want to use some formatting (bold, italic, ...) in a code
block, are there any good methods?
Gavin
···
On Friday, June 11, 2004, 5:47:07 AM, why wrote:
If you have a large block of text you want protected, you can surround
it with <notextile> tags. In addition, <pre> and <code> contents are
protected from Textile formatting.
Gavin Sinclair wrote:
If you have a large block of text you want protected, you can surround
it with <notextile> tags. In addition, <pre> and <code> contents are
protected from Textile formatting.
If you want to use some formatting (bold, italic, ...) in a code
block, are there any good methods?
I haven't thought much about this. Immediately, I'd say you would need to use a tag other than <pre> or <code>. Right now I just wrap those sorts of code blocks in <div class="formattedCode"> tags and then be sure to give the formattedCode class <pre>-like css properties.
With RedCloth 2.1, you'll also be able to override RedCloth's default handling of elements. Would that be okay?
_why
···
On Friday, June 11, 2004, 5:47:07 AM, why wrote:
why the lucky stiff writes:
Gavin Sinclair wrote:
>
>>If you have a large block of text you want protected, you can surround
>>it with <notextile> tags. In addition, <pre> and <code> contents are
>>protected from Textile formatting.
>
> If you want to use some formatting (bold, italic, ...) in a code
> block, are there any good methods?
>
I haven't thought much about this. Immediately, I'd say you would need
to use a tag other than <pre> or <code>. Right now I just wrap those
sorts of code blocks in <div class="formattedCode"> tags and then be
sure to give the formattedCode class <pre>-like css properties.
With RedCloth 2.1, you'll also be able to override RedCloth's default
handling of elements. Would that be okay?
Hmm...I did not see Gavin's message or any others except my original post and
this one.
I didn't know about <notextile> or ==notextile==. I'll give them a try. Time
to read the source code.
Jim
···
> On Friday, June 11, 2004, 5:47:07 AM, why wrote:
--
Jim Menard, jimm@io.com, http://www.io.com/~jimm/
"Build a man a fire and he's warm for the rest of the evening.
Set a man on fire and he's warm for the rest of his life."
-- Steve Taylor, in comp.lang.smalltalk
I'm curious more than anything. I'd rather see a standard for this
sort of thing than have to roll my own, but again I'm not aching for
it.
Thanks,
Gavin
···
On Friday, June 11, 2004, 12:04:41 PM, why wrote:
Gavin Sinclair wrote:
On Friday, June 11, 2004, 5:47:07 AM, why wrote:
If you have a large block of text you want protected, you can surround
it with <notextile> tags. In addition, <pre> and <code> contents are
protected from Textile formatting.
If you want to use some formatting (bold, italic, ...) in a code
block, are there any good methods?
I haven't thought much about this. Immediately, I'd say you would need
to use a tag other than <pre> or <code>. Right now I just wrap those
sorts of code blocks in <div class="formattedCode"> tags and then be
sure to give the formattedCode class <pre>-like css properties.
With RedCloth 2.1, you'll also be able to override RedCloth's default
handling of elements. Would that be okay?