Maven Doxia

DocBookParser swallows significant whitespace

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.1
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

The same as DOXIA-222 just for another XML parser. The patch is defensive and copies the fix from XhtmlBaseParser around just like the orginal code was copy&paste. However, I believe it would make sense to move this implementation of handleText() into AbstractXmlParser such that the various XML parsers get this behaviour out-of-the-box. Those that need different handling can still override the method.

Issue Links

Activity

Hide
Lukas Theussl added a comment -

Applied in r630310, thanks!

However, I prefer to leave the text handling to the implementation, at least for now. Sure, we could reduce some code duplication but I don't know if the current behavior is sensible as a default. I don't remember the exact reason but I introduced the splitting only to make the identity tests pass (http://svn.apache.org/viewvc?view=rev&revision=583455), but in principle I don't see why a parser should emit separate text events for each new line.

Show
Lukas Theussl added a comment - Applied in r630310, thanks! However, I prefer to leave the text handling to the implementation, at least for now. Sure, we could reduce some code duplication but I don't know if the current behavior is sensible as a default. I don't remember the exact reason but I introduced the splitting only to make the identity tests pass (http://svn.apache.org/viewvc?view=rev&revision=583455), but in principle I don't see why a parser should emit separate text events for each new line.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: