2014-02-05 52 views
0

我正在使用Jekyll生成一個網站,我使用kramdown來解析降價。我有一個腳本,我想在表格單元格內進行評估。然而,腳本需要一個新的線,以便kramdown/jekyll正確解析它。像下面這樣:用換行符在markdown(kramdown)表中插入腳本

Cell 1 | Cell 2 
Cell 3 | <script>.. 
</script> 
Cell 5 | Cell 6 

這並沒有給出

<table> 
    <tr> 
     <td>Cell 1</td> 
     <td>Cell 2</td> 
    </tr> 
    <tr> 
     <td>Cell 3</td> 
     <td><script>... 
</script></td> 
    </tr> 
    <tr> 
     <td>Cell 5</td> 
     <td>Cell 6</td> 
    </tr> 
</table> 

實際腳本我使用(如果它幫助)所需的輸出是如此它是隱藏的電子郵件地址形式

<script type="text/javascript"> 
//<![CDATA[ 
<!-- 
var x="function f(x){var i,o=\"\",l=x.length;for(i=0;i<l;i+=2) {if(i+1<l)o+=" + 
"x.charAt(i+1);try{o+=x.charAt(i);}catch(e){}}return o;}f(\"ufcnitnof x({)av" + 
" r,i=o\\\"\\\"o,=l.xelgnhtl,o=;lhwli(e.xhcraoCedtAl(1/)3=!45{)rt{y+xx=l;=+;" + 
"lc}tahce({)}}of(r=i-l;1>i0=i;--{)+ox=c.ahAr(t)i};erutnro s.buts(r,0lo;)f}\\" + 
"\"(6),7\\\"\\\\26\\\\04\\\\03\\\\\\\\20\\\\03\\\\00\\\\\\\\13\\\\06\\\\02\\" + 
"\\\\\\tF\\\\\\\\31\\\\0I\\\\AL17\\\\0E\\\\ns}p7c17\\\\\\\\19wc4=77\\\\1{\\\\"+ 
"}p0jP/V)m4rkpl #m]21\\\\06\\\\03\\\\\\\\6R03\\\\\\\\26\\\\0t\\\\\\\\\\\\25\\"+ 
"\\06\\\\02\\\\\\\\16\\\\00\\\\02\\\\\\\\7403\\\\\\\\33\\\\00\\\\02\\\\\\\\3" + 
"5\\\\0n\\\\\\\\\\\\2T00\\\\\\\\30\\\\07\\\\00\\\\\\\\03\\\\00\\\\01\\\\\\\\" + 
"05\\\\0E\\\\X:02\\\\06\\\\00\\\\\\\\20\\\\0t\\\\\\\\\\\\>@7b17\\\\\\\\5t<6>" + 
",\\\\$\\\\\\\"z\\\\<'=4-:\\\"\\\\\\\\\\\\\\\\((\\\"}fo;n uret}r);+)y+^(i)t(" + 
"eAodrCha.c(xdeCoarChomfrg.intr=So+7;12%={y+)i+l;i<0;i=r(foh;gten.l=x,l\\\"\\"+ 
"\\\\\"\\\\o=i,r va){,y(x fontincfu)\\\"\")"         ; 
while(x=eval(x)); 
//--> 
//]]> 
</script> 

編輯:正如帕克建議我已經發布了下面的輸出。

我使用的是Jekyll 1.4.3和kramdown 1.3.1。

Kramdown似乎將整個事情都包裝在一個pragaraph中,即我得到以下輸出。

<p>e: | <script>... 
...</script> 
p: | +44 131 651 7671 
a: | Room 5402, School of Mathematics 
    | James Clerk Maxwell Building 
    | King’s Buildings 
    | Edinburgh, EH9 3JZ</p> 
+0

你會得到什麼輸出?您使用哪種Jekyll版本和Markdown渲染器和版本? – parkr

+0

謝謝,我用信息編輯了我的問題。 – noaham

回答

0

不幸的是,kramdown目前不允許在—看到this issue瞭解有關改變將提案表換行。