14 lines
1.1 KiB
Text
14 lines
1.1 KiB
Text
|
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">$initHighlight</span>(<span class="hljs-params">block, cls</span>) </span>{
|
||
|
<span class="hljs-keyword">try</span> {
|
||
|
<span class="hljs-keyword">if</span> (cls.search(<span class="hljs-regexp">/\bno\-highlight\b/</span>) != <span class="hljs-number">-1</span>)
|
||
|
<span class="hljs-keyword">return</span> process(block, <span class="hljs-literal">true</span>, <span class="hljs-number">0x0F</span>) +
|
||
|
<span class="hljs-string">' class=""'</span>;
|
||
|
} <span class="hljs-keyword">catch</span> (e) {
|
||
|
<span class="hljs-comment">/* handle exception */</span>
|
||
|
}
|
||
|
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span> / <span class="hljs-number">2</span>; i < classes.length; i++) {
|
||
|
<span class="hljs-keyword">if</span> (checkCondition(classes[i]) === <span class="hljs-literal">undefined</span>)
|
||
|
<span class="hljs-keyword">return</span> <span class="hljs-regexp">/\d+[\s/]/g</span>;
|
||
|
}
|
||
|
}
|