jira-importer commented on issue #762:
URL: 
https://github.com/apache/maven-javadoc-plugin/issues/762#issuecomment-2957350443

   **[Thorsten 
Schöning](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=tschoening)**
 commented
   
   > How is Maven supposed to know that this is a path and not a mere string?
   
   One might argue that the backslash is explicitly used as an escape character 
in the spec at least at two places, one is the already mentioned paths, the 
other seem to be tag names:
   
   > Use of Colon in Tag Name - A colon can be used in a tag name if it is 
escaped with a backslash. For this doc comment:
   
   
https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#javadocoptions
   
   > If a filename contains embedded spaces, put the whole filename in double 
quotes, and double each backslash ("My Files\\Stuff.java").
   
   
https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#argumentfiles
   
   If the backslash is an escape character, it can not be used by itself only 
in the options files and that is the only thing one needs to take care about in 
this context. So shouldn't it be somewhat safe to simply define that if a 
backslash is not followed by another one or a colon, it needs to be doubled? 
"\\" is a valid escape sequence and "\:" is as well, all others are not.
   
   The only problem is that it's not clearly documented this way in the spec 
from my understanding, but again one could argue that an optionally wrong "\\" 
in some arbitrary text not breaking things might be less of a problem than a 
not escaped "\" in a path breaking things or needing ugly workarounds like mine.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to