Invenzzia »

Pages: [1]   Go Down
  Print  
Author Topic: Emphasis inside code blocks  (Read 609 times)
0 Members and 1 Guest are viewing this topic.
__note
User

Offline Offline

Posts: 2


View Profile
« on: September 04, 2010, 23:53:06 »

I just want to emphasise some code inside code blocks. I tried do it the same way as outside ("**") and using HTML tags but it doesn't work. I won't be surprised if it is hard to make it work because code blocks must treat everything in it literally but I would be very grateful if you can help me.
Logged
eXtreme
Invenzzia
Administrator
User
*****
Offline Offline

Posts: 129

Jacek Jędrzejewski


View Profile WWW
« Reply #1 on: September 05, 2010, 10:03:27 »

With markdown syntax it is impossible. But nothing stops you from using HTML blocks. :)

Code:
test

<pre><code>
test <strong>test</strong> test
</code></pre>

test

such code works great. Unfortunately, any other html WON'T be escaped there so you need to put &lt; and &gt; manually if you have < or > there.

HOWEVER. You can use markdown span enabler - markdown="span":

Code:
test

<pre><code markdown="span">
test **test** test
</code></pre>

test

It will convert all "span"-type syntax inside the <code> tag. Block syntax won't be touched and you will have also escaping.
Logged

__note
User

Offline Offline

Posts: 2


View Profile
« Reply #2 on: September 05, 2010, 17:57:40 »

Second solution perfectly suits my needs. Thanks!
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Subject Started by Replies Views Last post
REGULAMIN Zyx 0 1096 Last post January 30, 2008, 09:34:09
by Zyx
RULES Zyx 0 2560 Last post January 30, 2008, 09:52:22
by Zyx
OPT w Ohloh.net Zyx 0 798 Last post March 19, 2009, 07:19:07
by Zyx
OPL: Help promoting OPL! Zyx 0 675 Last post March 04, 2009, 12:19:47
by Zyx
Do you want custom branches on Launchpad? Zyx 0 1783 Last post May 17, 2009, 11:08:00
by Zyx