Maven Doxia

Confluence module does not recognize line breaks (\\)

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: Module - Confluence
  • Labels:
    None
  • Number of attachments :
    2

Description

Confluence module does not recognize line breaks (
)

Activity

Hide
Vincent Massol added a comment - - edited

Dave, is this a duplicate of DOXIA-162?

Show
Vincent Massol added a comment - - edited Dave, is this a duplicate of DOXIA-162?
Hide
Dave Syer added a comment -

No, not really. This is about the confluence markup for an explicit line ending - two backslashes (which I don't know how to write verbatim here). DOXIA-162 is definitely more urgent than this one, even though it is quite irritating.

Show
Dave Syer added a comment - No, not really. This is about the confluence markup for an explicit line ending - two backslashes (which I don't know how to write verbatim here). DOXIA-162 is definitely more urgent than this one, even though it is quite irritating.
Hide
Dave Syer added a comment -

Patch relative to modules directory.

Show
Dave Syer added a comment - Patch relative to modules directory.
Hide
Lukas Theussl added a comment -

I've had a quick look at this patch and have some issues:

  • first, please adhere to our coding conventions, in particular, no tabs, no System.out/err
  • the EOL string is available to the ConfluenceParser through the Markup interface, it should also be available to the BlockParser
  • a confluence linebreak element should produce a sink lineBreak(), not an EOL. Ie, your test input
Line\\
break.

should produce the following TextSink output:

begin:paragraph
text: Line
lineBreak
text: break.
end:paragraph

instead of

begin:paragraph
text: Line
break.
end:paragraph
  • last but not least: in the future I will refuse to apply any patch that has the doxia tree checked out under a directory called 'crap'...
Show
Lukas Theussl added a comment - I've had a quick look at this patch and have some issues:
  • first, please adhere to our coding conventions, in particular, no tabs, no System.out/err
  • the EOL string is available to the ConfluenceParser through the Markup interface, it should also be available to the BlockParser
  • a confluence linebreak element should produce a sink lineBreak(), not an EOL. Ie, your test input
Line\\
break.
should produce the following TextSink output:
begin:paragraph
text: Line
lineBreak
text: break.
end:paragraph
instead of
begin:paragraph
text: Line
break.
end:paragraph
  • last but not least: in the future I will refuse to apply any patch that has the doxia tree checked out under a directory called 'crap'...
Hide
Dave Syer added a comment -
  • Coding conventions: is there an Eclipse prefs file anywhere?
  • EOL - wasn't needed in the parser but thanks for the tip.
  • lineBreak - didn't know about that one, thank.
  • "crap" is just a name. In the future I will refuse to submit patches if arbitrary rules are applied to them.

Maybe I'm not the right person to be doing this. If there are rules and pieces of Doxia knowledge that other people know more about I am quite happy to sit back and wait. But obviously I won't be using the Confluence module until it is in better shape.

Show
Dave Syer added a comment -
  • Coding conventions: is there an Eclipse prefs file anywhere?
  • EOL - wasn't needed in the parser but thanks for the tip.
  • lineBreak - didn't know about that one, thank.
  • "crap" is just a name. In the future I will refuse to submit patches if arbitrary rules are applied to them.
Maybe I'm not the right person to be doing this. If there are rules and pieces of Doxia knowledge that other people know more about I am quite happy to sit back and wait. But obviously I won't be using the Confluence module until it is in better shape.
Hide
Lukas Theussl added a comment -

Coding conventions: http://maven.apache.org/guides/development/guide-m2-development.html#Maven_Code_Style

For the crap line: it was meant as a pun, don't let my bad english prevent you from calling your patches whatever you want...

If you are not the right person for doing this, then I don't see who else, because as you might have inferred from the response on the list, none of the current doxia committers is that familiar with the confluence module. So please, keep the patches coming, I promise we'll have at least a look at it.

Show
Lukas Theussl added a comment - Coding conventions: http://maven.apache.org/guides/development/guide-m2-development.html#Maven_Code_Style For the crap line: it was meant as a pun, don't let my bad english prevent you from calling your patches whatever you want... If you are not the right person for doing this, then I don't see who else, because as you might have inferred from the response on the list, none of the current doxia committers is that familiar with the confluence module. So please, keep the patches coming, I promise we'll have at least a look at it.
Hide
Dave Syer added a comment -

Updated patch (*-1.txt) with correct use of lineBreak().

Show
Dave Syer added a comment - Updated patch (*-1.txt) with correct use of lineBreak().
Hide
Lukas Theussl added a comment -

Patch applied, thanks!

Note that I have put the LineBreak test into ConfluenceParserTest, if you extend it then the base tests get executed twice.

Show
Lukas Theussl added a comment - Patch applied, thanks! Note that I have put the LineBreak test into ConfluenceParserTest, if you extend it then the base tests get executed twice.
Hide
Dave Syer added a comment -

I get a compile error when I update from SVN after the patch weas applied - EOL is not resolved. Did you mean to expose it in the base class?

Show
Dave Syer added a comment - I get a compile error when I update from SVN after the patch weas applied - EOL is not resolved. Did you mean to expose it in the base class?
Hide
Lukas Theussl added a comment -

You also need to update and install doxia core, see my last commit there: https://svn.apache.org/viewvc?view=rev&revision=588572

Show
Lukas Theussl added a comment - You also need to update and install doxia core, see my last commit there: https://svn.apache.org/viewvc?view=rev&revision=588572

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: