Code blocks, the colon and French

Olivier Scherler os-lists at ithink.ch
Tue Mar 16 17:32:43 EST 2004


> I suppose that's great, but half of my website is in French. The 
> problem is that the code block syntax is somewhat "incompatible" with 
> the French typographical standard that tend to also put a space 
> *before* the colon.

Yes, but an unbreakable space. Markdown won’t ditch the colon here:

Exemple de code :

    <?php echo "Je vous salue" ?>


because it’s preceded by an unbreakable space.

Of course, if you want your CMS to automatically convert “space, colon” to
“unbreakable space, colon”, you’re toast. But consider converting “colon” to
“unbreakable space, colon” instead, because my experience tells me that few
people put the space before the colon when they write in French. Well, few Swiss
people at least ;)

Another solution is to write it this way:

Exemple de code :

:
    <?php echo "Je vous salue" ?>

The space is a normal one, but since the second colon flags the code block, the
first colon is left alone.

Then, in the manual of your CMS, change this:

> If you don’t want a colon to appear in your HTML output, put a space
> before it. [...] Or, you can put the colon on a line by itself before
> the code block

to 

> Si vous ne voulez pas que les deux points apparaissent, placez-les
> seuls sur une ligne avant le bloc de code.

By the way, can you tell me more about your upcoming CMS? (off-list, and in
French if you want).

Olivier

∞ Unicode Ribbon Campaign — No ASCII, anywhere ∞
∞ <http://ithink.ch/unicode>                   ∞

:: Olivier Scherler :: Neuchâtel - Switzerland :: http://ithink.ch/blog/ ::


More information about the Markdown-discuss mailing list