Maven Doxia

Doxia creates files with inconsistent new lines

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-alpha-8
  • Fix Version/s: 1.1
  • Component/s: Core
  • Labels:
    None
  • Number of attachments :
    1

Description

It uses \n instead of System.getProperty( line.separator );

Issue Links

Activity

Hide
Carlos Sanchez added a comment -

Fixed writing of \n, now we need to process the Strings passed as parameters and change the line endings to the current system' one

Show
Carlos Sanchez added a comment - Fixed writing of \n, now we need to process the Strings passed as parameters and change the line endings to the current system' one
Hide
Nap Ramirez added a comment -

Since there probably are a lot of implementing parsers out there, I figured it might be better to filter the line separators in the core parser itself than from the wrapping parsers. Attached is a patch of my workaround for the inconsistent line separators. It modifies MXParser.getText() and a test method is added too.

The patch doesn't involve any doxia code, but I hope it helps resolve this issue.

Show
Nap Ramirez added a comment - Since there probably are a lot of implementing parsers out there, I figured it might be better to filter the line separators in the core parser itself than from the wrapping parsers. Attached is a patch of my workaround for the inconsistent line separators. It modifies MXParser.getText() and a test method is added too. The patch doesn't involve any doxia code, but I hope it helps resolve this issue.
Hide
Carlos Sanchez added a comment -

We need to check what is the behaviour of a independent parser like StaX.

If it changes line endings we can fix plexus parser or move definitively to StaX.
If it keeps mixed line endings we would have to change them at a higher level (doxia parsers)

Show
Carlos Sanchez added a comment - We need to check what is the behaviour of a independent parser like StaX. If it changes line endings we can fix plexus parser or move definitively to StaX. If it keeps mixed line endings we would have to change them at a higher level (doxia parsers)
Hide
Vincent Siveton added a comment -

Lukas created a standard testing parser (DOXIA-101).
Actually, we need to add unix style line.separator as system property to be able to run correctly tests on windows (r567231).

Show
Vincent Siveton added a comment - Lukas created a standard testing parser (DOXIA-101). Actually, we need to add unix style line.separator as system property to be able to run correctly tests on windows (r567231).
Hide
Lukas Theussl added a comment -

Added Napoleon's snippet to AbstractSink. For now only XhtmlBaseSink uses it, which is probably the most important one, but in principle every sink should filter its text output through this method.

Show
Lukas Theussl added a comment - Added Napoleon's snippet to AbstractSink. For now only XhtmlBaseSink uses it, which is probably the most important one, but in principle every sink should filter its text output through this method.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: