PHP çok iyi değilim ve bu (dört boşluk girintili metin bloğu) döner bir PHP işlevi istiyorum:
printf("goodbye world!"); /* his suicide note
was in C */
Bu içine:
<pre><code> printf("goodbye world!"); /* his suicide note
was in C */</code></pre>
Bozulmamış tüm diğer satırları bırakmak.
Bu Markdown ne olduğunu. I this PHP port of Markdown (function doCodeBlocks() bakınız) bulundu, ama ben sadece bu tek fonksiyon istiyorum, tüm Markdown dosyayı kullanmak istemiyorum.
Birisi bu işe almak için gereken minimum PHP kodu ile bana sağlayabilir? Yani bunu yapabilirsiniz:
<?php echo markdownPre('Here goes some code:
var x = 1, y = 2;
alert(x + y);
That should be a pre block.'); ?>