You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@codehaus.org> on 2013/04/01 20:26:52 UTC

[jira] (DOXIA-467) Confluence: Inconsistent handling of '\' escape characters, incorrect handling of \\ inside {{monospace}} blocks.

    [ https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=323004#comment-323004 ] 

Robert Scholte commented on DOXIA-467:
--------------------------------------

The patches contain fixes for several different issue.
I've started by isolating the single trailing backward slash at the end of a line, which has been fixed in [r1463173|http://svn.apache.org/r1463173]
The backwardslashes within a monospaced block is fixed in [r1463228|http://svn.apache.org/r1463228]

The rest hasn't been patched, because I can't figure out which tests belong to which Parser adjustment.
If you could split them up in smaller patches, I'm happy to apply them.
 
                
> 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: confluence-escaping-hg.patch, confluence-escaping-patch-files.zip, 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
For more information on JIRA, see: http://www.atlassian.com/software/jira