diff --git a/lib/highlight.js b/lib/highlight.js index aa62c5e..96e5b00 100644 --- a/lib/highlight.js +++ b/lib/highlight.js @@ -63,7 +63,10 @@ function outdent( string ) { } function syntaxHighlight( html ) { - var $ = cheerio.load( html ); + + // The third parameter is `false` to disable wrapping contents + // in `...`, etc. + var $ = cheerio.load( html, null, false ); $( "pre > code" ).each( function() { var $t = $( this ), diff --git a/test/expected/wordpress/posts/page/pages/Hello_World.html b/test/expected/wordpress/posts/page/pages/Hello_World.html index 56c7fd8..db2a734 100644 --- a/test/expected/wordpress/posts/page/pages/Hello_World.html +++ b/test/expected/wordpress/posts/page/pages/Hello_World.html @@ -1,5 +1,6 @@ -

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque pellentesque placerat arcu, vel viverra augue posuere commodo. Aenean hendrerit quam sed commodo pellentesque.

+ +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque pellentesque placerat arcu, vel viverra augue posuere commodo. Aenean hendrerit quam sed commodo pellentesque.

Donec sed commodo velit, non molestie justo.

Phasellus

Cras vel justo molestie lorem auctor convallis. Donec ac lacus tincidunt, euismod lectus eu, pulvinar tortor.

@@ -31,4 +32,3 @@

Phasellus

Sed sed molestie purus

Aliquam venenatis sem elit, et aliquet libero ultrices vitae. Nullam rutrum convallis justo, sed suscipit leo facilisis et.

- \ No newline at end of file diff --git a/test/expected/wordpress/posts/page/pages/Mark.html b/test/expected/wordpress/posts/page/pages/Mark.html index fc8cf11..f449c8f 100644 --- a/test/expected/wordpress/posts/page/pages/Mark.html +++ b/test/expected/wordpress/posts/page/pages/Mark.html @@ -1,5 +1,5 @@ -

Conubia linguae hydrae novissima recepto certe, clarus quod amictus tum ignota fluctibus et quod, est verba capitum, variusque. Sui saevam gentes propiora Cycladas, Hecate stamina nurus ramum!

+

Conubia linguae hydrae novissima recepto certe, clarus quod amictus tum ignota fluctibus et quod, est verba capitum, variusque. Sui saevam gentes propiora Cycladas, Hecate stamina nurus ramum!

link Oculi miserarum

Lorem markdownum silentia umerique, colla. Per felix innoxia pariterque capillos accessit, nec ad tempore in nubes detrahitur.

Aures precantibus supplice Medusaeo, Lycormas est esse aestuat aut Pterelas.

link Domitos interea

    @@ -7,4 +7,3 @@