Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-12-27 10:26:56

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

[textile] Use strong emphasis in a code block

Anyone know how to use emphasis in a code block? Like so:

This is a code block, with *strong* text.

Can’t see a way to do this..all I get is the asterisk instead of the bold…

Last edited by jstubbs (2008-12-27 10:27:20)

Offline

#2 2008-12-27 11:22:50

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: [textile] Use strong emphasis in a code block

This won’t work, ‘cause the all tags in the code block will not be parsed. The reason is: All between the generated <pre><code> and </code></pre> will not be formatted by browsers (HTML-Specs). It will be rendered as is.

It’s not a semantic HTML but you can give a block element (paragraph or some generic div) the appearance of a pre/code tag for instance:

p{overflow:auto;margin:1.5em 0;padding:5px;font-family:"Courier New",monospace;}. This is a code block, with *strong* text.

Won’t work in this forum, ‘cause the style attribute will be stripped.

Last edited by trenc (2008-12-27 11:24:24)


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

#3 2008-12-27 11:31:20

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [textile] Use strong emphasis in a code block

Thanks trenc, won’t use your code as I don’t want to change the styles already created for pre/code etc, but thanks for your help!

Offline

Board footer

Powered by FluxBB