[
https://jira.codehaus.org/browse/MSITE-692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=359477#comment-359477
]
Michael Osipov commented on MSITE-692:
--------------------------------------
I have located this problem and it is not rooted in the site plugin but is
two-fold:
1. Doxia has been upgraded and its
[{{AbstractXmlSink#writeStartTag}}|http://maven.apache.org/doxia/doxia/doxia-core/xref/org/apache/maven/doxia/sink/AbstractXmlSink.html#L111]
adds by default a line break after each block since {{div}} and {{pre}} are
considered to be block elements they are split apart which does not matter for
HTML/XML.
2. The
[{{site.vm}}|http://svn.apache.org/viewvc/maven/skins/branches/maven-fluido-skin-1.3.x/src/main/resources/META-INF/maven/site.vm?view=markup#l1146]
of the skin used (fluido) has a very stupid approach to apply the
{{prettyprint}} class:
{code}
$bodyContent.replaceAll( "<div class=\"source\"><pre>", "<div
class=\"source\"><pre class=\"$sourceStyle\">" ).replaceAll(
"class=\"bodyTable\"", "class=\"table table-striped\"" )
{code}
it completely neglects that XML cannot be processed with regex but it happens
here. Whitespace characters between them are ignored.
Since fluido is the only skin whoch does pretty print, I will move this issue.
> The maven-site-plugin v3.3 does not render snippets as in v3.2 (Syntax
> highlighting and line numbers)
> -----------------------------------------------------------------------------------------------------
>
> Key: MSITE-692
> URL: https://jira.codehaus.org/browse/MSITE-692
> Project: Maven Site Plugin
> Issue Type: Bug
> Components: doxia integration
> Affects Versions: 3.3
> Environment: Maven v3.0.5
> Reporter: Rautureau
> Attachments: 3.2.png, 3.3.png, maven-site-example.zip
>
>
> Hi,
> you will find in attachment a maven project that shows the issue.
> When you run the command {{mvn site}} you get:
> !3.2.png!
> When you run the command {{mvn site -Dmaven.site.plugin.version=3.3}} you get
> !3.3.png!
> By comparing html produce by maven-site-plugin:
> * With 3.2, all snippets are in tag "<pre class="prettyprint linenums">some
> code</pre>
> * With 3.3, all snippets are in tag "<pre>some code</pre>"
> This is why the fluido skin .js don't activate color syntax nor line
> numbering.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)