3
我使用的是基於michelf's project的dflydev's markdown將Markdown轉換爲HTML。自定義降價標記
我的網站是RTL默認情況下,我想添加自定義標籤允許左對齊的段落,
是這樣的:
regular text, right aligned.
<- some text that will be aligned to the left
<--
fenced text that will be aligned to the left
<--
我試圖建立正則表達式模式趕上這些塊:
- 對於
<- ...
我:/^<- ([^\n]+)/
- 對於圍欄塊我無法得到一個工作模式
我想得到圍欄正則表達式的幫助,並改進我已有的單行正則表達式。
謝謝!
它正確匹配塊的內容,但我需要用HTML' ...'替換整個塊'< - ... < - ',並且匹配不包括標籤'< --' – tamir
@tamir checkout [my response](http://stackoverflow.com/a/14031874/1006989),我更新它包含標籤 – 2012-12-25 15:48:07