[
https://jira.codehaus.org/browse/MSKINS-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=359477#comment-359477
]
Michael Osipov edited comment on MSKINS-95 at 12/22/14 6:11 AM:
----------------------------------------------------------------
I have located this problem and it is not rooted in the site plugin but is
two-fold:
1. Doxia has been upgraded in the site plugin 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.
was (Author: michael-o):
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.
> Doxia 1.6 puts a line break between div and pre, pretty print is broken
> -----------------------------------------------------------------------
>
> Key: MSKINS-95
> URL: https://jira.codehaus.org/browse/MSKINS-95
> Project: Maven Skins
> Issue Type: Bug
> Components: Fluido Skin
> Affects Versions: fluido-1.3.1
> Environment: Maven v3.0.5
> Reporter: Rautureau
> Fix For: fluido-1.4.0, fluido-1.3.2
>
> 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)