/** * Establishes a contract for reading events stored in arbitrary formats from * reliable, resettable streams. */@InterfaceAudience.Public@InterfaceStability.EvolvingpublicinterfaceEventDeserializerextendsResettable, Closeable {
Output (wrong format around span.javadoc):
<divclass="line"><spanclass="javadoc">/**</div><divclass="line"> * Establishes a contract for reading events stored in arbitrary formats from</div><divclass="line"> * reliable, resettable streams.</div><divclass="line"> */</span></div><divclass="line"><spanclass="annotation">@InterfaceAudience</span>.Public</div><divclass="line"><spanclass="annotation">@InterfaceStability</span>.Evolving</div><divclass="line"><spanclass="keyword">public</span><spanclass="class"><spanclass="keyword">interface</span><spanclass="title">EventDeserializer</span><spanclass="keyword">extends</span><spanclass="title">Resettable</span>, <spanclass="title">Closeable</span></span>{</div>
Both backtick and code block plugins in Hexo wrap each line with a div.line, but the output from Highlightjs could contain html tags that cross multiple lines. Take the code above as a example, the output from Highlightjs is:
<spanclass="hljs-javadoc">/**
* Establishes a contract for reading events stored in arbitrary formats from
* reliable, resettable streams.
*/</span><spanclass="hljs-annotation">@InterfaceAudience</span>.Public
<spanclass="hljs-annotation">@InterfaceStability</span>.Evolving
<spanclass="hljs-keyword">public</span><spanclass="hljs-class"><spanclass="hljs-keyword">interface</span><spanclass="hljs-title">EventDeserializer</span><spanclass="hljs-keyword">extends</span><spanclass="hljs-title">Resettable</span>, <spanclass="hljs-title">Closeable</span></span>{
Hexo splits the output from highlightjs and wrap every line with a div.line. I think Hexo does so to support the line numbers because Highlightjs doesn't (http://highlightjs.readthedocs.org/en/latest/line-numbers.html). However, even if you configure the line-number to false in highlight section of _config.yml, Hexo still does the wrapping.
I did some small modification to cancel the wrapping, if someone wants to do this as well, please look into lib/plugins/filter/backtick_code_block.js and lib/plugins/tag/code.js, these two files pass configurations to lib/util/highlight.js, where the wrapping happens.
The text was updated successfully, but these errors were encountered:
Input:
Output (wrong format around span.javadoc):
Both backtick and code block plugins in Hexo wrap each line with a div.line, but the output from Highlightjs could contain html tags that cross multiple lines. Take the code above as a example, the output from Highlightjs is:
Hexo splits the output from highlightjs and wrap every line with a div.line. I think Hexo does so to support the line numbers because Highlightjs doesn't (http://highlightjs.readthedocs.org/en/latest/line-numbers.html). However, even if you configure the line-number to
false
in highlight section of _config.yml, Hexo still does the wrapping.I did some small modification to cancel the wrapping, if someone wants to do this as well, please look into lib/plugins/filter/backtick_code_block.js and lib/plugins/tag/code.js, these two files pass configurations to lib/util/highlight.js, where the wrapping happens.
The text was updated successfully, but these errors were encountered: