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

2013-04-01 Thread Robert Scholte (JIRA)

[ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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


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

2012-06-04 Thread Valters Vingolds (JIRA)

 [ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Valters Vingolds updated DOXIA-467:
---

Attachment: confluence-escaping-patch-files.zip
confluence-escaping-hg.patch

I am attaching updated version of patch (mercurial format, I imported source to 
private hg repo to produce acceptable patch, and not lose track of other 
changes I am experimenting with).

Also attaching the changed files, incase it is simply easier for you to use 
some DiffMerge visual tool.

This patch also handles following markup correctly:
{code}
 {{monospaced $\{with.escaped.variable\}}}
{code}

 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: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




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

2012-06-04 Thread Valters Vingolds (JIRA)

[ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=300315#comment-300315
 ] 

Valters Vingolds commented on DOXIA-467:


Ok, with llowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. 

 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: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




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

2012-06-04 Thread Valters Vingolds (JIRA)

[ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=300315#comment-300315
 ] 

Valters Vingolds edited comment on DOXIA-467 at 6/4/12 10:56 AM:
-

Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. 

  was (Author: valters):
Ok, with llowing to escape { via \, now there is issue with markup like 
this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. 
  
 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: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




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

2012-06-04 Thread Valters Vingolds (JIRA)

[ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=300315#comment-300315
 ] 

Valters Vingolds edited comment on DOXIA-467 at 6/4/12 11:00 AM:
-

Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. Probably also [ and ], because [subscripts] are more common 
that idea to include links in monospace blocks.

  was (Author: valters):
Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. 
  
 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: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




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

2012-06-04 Thread Valters Vingolds (JIRA)

[ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=300315#comment-300315
 ] 

Valters Vingolds edited comment on DOXIA-467 at 6/4/12 1:50 PM:


Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. Probably also [ and ], because [subscripts] are more common 
that idea to include links in monospace blocks.

For the prevous example, I will support following markup:
{code}
{{monospaced ${with.escaped.variable}}}
{code}

though that means we must be able to match the  greedy (but Confluence 
does not match them greedy)

  was (Author: valters):
Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. Probably also [ and ], because [subscripts] are more common 
that idea to include links in monospace blocks.
  
 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: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




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

2012-06-04 Thread Valters Vingolds (JIRA)

[ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=300315#comment-300315
 ] 

Valters Vingolds edited comment on DOXIA-467 at 6/4/12 1:51 PM:


Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. Probably also [ and ], because [subscripts] are more common 
that idea to include links in monospace blocks.

For the prevous example, I will support following markup:
{code}
{{monospaced ${with.escaped.variable}}}
{code}

though that means we must be able to match the {{monospace}}} greedy (but 
Confluence Wiki does not match them greedy)

  was (Author: valters):
Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. Probably also [ and ], because [subscripts] are more common 
that idea to include links in monospace blocks.

For the prevous example, I will support following markup:
{code}
{{monospaced ${with.escaped.variable}}}
{code}

though that means we must be able to match the  greedy (but Confluence 
does not match them greedy)
  
 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: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




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

2012-06-04 Thread Valters Vingolds (JIRA)

[ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=300315#comment-300315
 ] 

Valters Vingolds edited comment on DOXIA-467 at 6/4/12 1:51 PM:


Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. Probably also [ and ], because [subscripts] are more common 
that idea to include links in monospace blocks.

For the prevous example, I will support following markup:
{code}
{{monospaced ${with.escaped.variable}}}
{code}

though that means we must be able to match the
{code}
{{monospace}}}
{code}
greedy (but Confluence Wiki does not match them greedy: {{monospace}}}

  was (Author: valters):
Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. Probably also [ and ], because [subscripts] are more common 
that idea to include links in monospace blocks.

For the prevous example, I will support following markup:
{code}
{{monospaced ${with.escaped.variable}}}
{code}

though that means we must be able to match the {{monospace}}} greedy (but 
Confluence Wiki does not match them greedy)
  
 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: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




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

2012-06-04 Thread Valters Vingolds (JIRA)

[ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=300315#comment-300315
 ] 

Valters Vingolds edited comment on DOXIA-467 at 6/4/12 1:52 PM:


Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. Probably also [ and ], because [subscripts] are more common 
that idea to include links in monospace blocks.

For the previous example, I will support following markup:
{code}
{{monospaced ${with.escaped.variable}}}
{code}

though that means we must be able to match the
{code}
{{monospace}}}
{code}
greedy (but Confluence Wiki does not match them greedy: {{monospace}}}

  was (Author: valters):
Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. Probably also [ and ], because [subscripts] are more common 
that idea to include links in monospace blocks.

For the prevous example, I will support following markup:
{code}
{{monospaced ${with.escaped.variable}}}
{code}

though that means we must be able to match the
{code}
{{monospace}}}
{code}
greedy (but Confluence Wiki does not match them greedy: {{monospace}}}
  
 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: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




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

2012-06-04 Thread Valters Vingolds (JIRA)

[ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=300315#comment-300315
 ] 

Valters Vingolds edited comment on DOXIA-467 at 6/4/12 3:45 PM:


Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. Probably also [ and ], because [subscripts] are more common 
than idea to include links in monospace blocks.

For the previous example, I will support following markup:
{code}
{{monospaced ${with.escaped.variable}}}
{code}

though that means we must be able to match the
{code}
{{monospace}}}
{code}
greedy (but Confluence Wiki does not match them greedy: {{monospace}}}

  was (Author: valters):
Ok, by allowing to escape { via \, now there is issue with markup like this:
{code}
{{\\path\to\folder\}}
{code}

now it thinks } is escaped, and does not terminate the monospace block 
correctly. I am thinking to make } and { to be treated literally in the 
monospace block. Probably also [ and ], because [subscripts] are more common 
that idea to include links in monospace blocks.

For the previous example, I will support following markup:
{code}
{{monospaced ${with.escaped.variable}}}
{code}

though that means we must be able to match the
{code}
{{monospace}}}
{code}
greedy (but Confluence Wiki does not match them greedy: {{monospace}}}
  
 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: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




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

2012-06-01 Thread Valters Vingolds (JIRA)
Valters Vingolds created DOXIA-467:
--

 Summary: 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




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

2012-06-01 Thread Valters Vingolds (JIRA)

[ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=300171#comment-300171
 ] 

Valters Vingolds commented on DOXIA-467:


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




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

2012-06-01 Thread Valters Vingolds (JIRA)

[ 
https://jira.codehaus.org/browse/DOXIA-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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