[ https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=300171#comment-300171 ]
Valters Vingolds edited comment on DOXIA-467 at 6/1/12 2:36 AM: ---------------------------------------------------------------- I see that Confluence actually does support \ \ line breaks inline, but with some clever rules to avoid breaking \\unc\path case, it appears. Where there appear undue line breaks, please read as \ \ :) was (Author: valters): I see that Confluence actually does support \ \ line breaks inline, but with some clever rules to avoid breaking \\unc\path case, it appears. > Confluence: Inconsistent handling of '\' escape characters, incorrect > handling of \\ inside {{monospace}} blocks. > ----------------------------------------------------------------------------------------------------------------- > > Key: DOXIA-467 > URL: https://jira.codehaus.org/browse/DOXIA-467 > Project: Maven Doxia > Issue Type: Bug > Components: Module - Confluence > Affects Versions: 1.3 > Reporter: Valters Vingolds > Attachments: monospace-escapes.patch > > > I noticed that our generated pages are mostly nonsense where we have > \\unc\path\strings and also some general DOS-style paths (c:\dos\run). The > issue is that \ are "eaten" because they are treated as escape characters and > get suppressed from output. This is incorrect, per Confluence rules, they > should appear almost always, and only function as escapes when directly > preceding _ and * characters with special meaning (note, in Confluence they > also have + and - and ^ and ~ with special meaning, it would be used to > escape them too, but we don't have that yet). > The other issue is with \\, confluence actually does not support line breaks > within the line (it seems to me), and only forces linebreak if \\ appears at > the end of line. This makes sense, because otherwise writing \\unc\path is > impossible (as you can't quite escape the '\\' with another '\'). I haven't > yet looked how feasible it is to make \\ only work as line break if it > appears at the end of line, but my requirement was simpler: to make \\ work > inside {{monospace}} blocks, i.e., make it appear verbatim, and not produce > linebreak. So that {{\\unc\path}} can be written and appear so. > I want to also propose to make handling of italic less zealous, as we happen > to have a lot of code variables that use underscore (variables_like_this), > and currently the underscores get eaten, and (like) part gets italicized. > (Escaping all underscores is not practical.) > I wish to propose that italic modifier _ should only work if preceded by > whitespace or * (+ some other edge cases). So _this_ should get italicized > but something_like_this would not. > (You can actually see the above work right here in this comment, as JIRA > parses this text according to Confluence rules. We should strive to replicate > this behaviour, as I see one use-case of this module is to transfer wiki > pages created in Confluence into source tree as documentation. That does not > work if our implementation does not faithfully render markup as Confluence > wiki would). > I am attaching a proposed patch. > (Sorry this patch also includes lines for DOXIA-466, I don't know how to > remove them. So if you already applied that patch, you will get some rejected > hunks). > Another part is that * and _ are always produced verbatim in monospace blocks. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira