[ 
https://issues.apache.org/jira/browse/DOXIA-482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082173#comment-15082173
 ] 

Hervé Boutemy edited comment on DOXIA-482 at 1/5/16 1:40 AM:
-------------------------------------------------------------

after thinking more at it, I'd like to improve [Parser 
API|http://maven.apache.org/doxia/doxia/doxia-core/apidocs/org/apache/maven/doxia/parser/Parser.html]
 with a new {{setEmitComments(boolean render)}}
by default, every parser has to render source comments to Sink API

but when a use case doesn't want to render comments in output, it just has to 
call {{setEmitComments(false)}}: this API could be used by Doxia Sitetools 
Doxia parsing.

And this would not change the general behaviour and intend of general Doxia


Notice that an equivalent {{setRenderComment(boolean)}} feature can be added to 
Sink API, to drop comment even if comment event are emitted to Sink API (for 
example by a report).
But if a report emits comments, I think it expects them to be rendered: that's 
why I prefer to use the Parse API improvement in the case of Doxia Sitetool


was (Author: hboutemy):
after thinking more at it, I'd like to improve [Parser 
API|http://maven.apache.org/doxia/doxia/doxia-core/apidocs/org/apache/maven/doxia/parser/Parser.html]
 with a new {{setParseComments(boolean render)}}
by default, every parser has to render source comments to Sink API

but when a use case doesn't want to render comments in output, it just has to 
call {{setParseComments(false)}}: this API could be used by Doxia Sitetools 
Doxia parsing.

And this would not change the general behaviour and intend of general Doxia


Notice that an equivalent feature can be added to Sink API, to drop comment 
even if comment event are emitted (for example by a report).
But if a report emits comments, I think it expects them to be rendered: that's 
why I prefer to use the Parse API improvement in the case of Doxia Sitetool

> don't translate APT source comments into output comments
> --------------------------------------------------------
>
>                 Key: DOXIA-482
>                 URL: https://issues.apache.org/jira/browse/DOXIA-482
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Module - Apt
>    Affects Versions: 1.3
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>             Fix For: 1.7
>
>         Attachments: DOXIA-482.patch
>
>
> I have defined this as the very first lines in my apt file:
> {code}
> ~~ Copyright 2012 Michael Osipov
> ~~
> ~~ Licensed under the Apache License, Version 2.0 (the "License");
> ~~ you may not use this file except in compliance with the License.
> ~~ You may obtain a copy of the License at
> ~~
> ~~     http://www.apache.org/licenses/LICENSE-2.0
> ~~
> ~~ Unless required by applicable law or agreed to in writing, software
> ~~ distributed under the License is distributed on an "AS IS" BASIS,
> ~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> ~~ See the License for the specific language governing permissions and
> ~~ limitations under the License.
> ~~ $Id$
> {code}
> This is unfortunately translated in
> {{/html/body/div/div/div#bodyColumn}} to a line-by-line comment
> {noformat}
> <!-- Copyright 2012 Michael Osipov --><!--  --><!-- Licensed under the Apache 
> License, Version 2.0 (the "License"); --><!-- you may not use this file 
> except in compliance with the License. --><!-- You may obtain a copy of the 
> License at --><!--  --><!-- http://www.apache.org/licenses/LICENSE-2.0 
> --><!--  --><!-- Unless required by applicable law or agreed to in writing, 
> software --><!-- distributed under the License is distributed on an "AS IS" 
> BASIS, --><!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
> or implied. --><!-- See the License for the specific language governing 
> permissions and --><!-- limitations under the License. --><!-- $Id$ -->
> {noformat}
> This, of course, is somewhat useless. I'd rather would have split comments 
> like in JSP or Velocity. Template comments are left out and HTML comments 
> remain untouched.
> I obviously do not need the ASL somewhere in the middle of by page as comment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to