Uploaded image for project: 'Maven Doxia'
  1. Maven Doxia
  2. DOXIA-536

AptParser does not force linebreak in Sink after a comment is written

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.6
    • None
    • Module - Apt

    Description

      Consider this comment block:

      ~~ 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.
      

      Apt's comment syntax goes to the end of the line which would mean that if the AptParser hits a comment it has to create a line break with the target Sink too. Unfortunately, the result in, e.g., HTML is:

      <!-- 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. -->
      

      This is ugly doesn't make the comment readible at all. Investigate how we can send a line.separator, i.e., pretty-print the output.

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              michael-o Michael Osipov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: