Closed GoogleCodeExporter closed 9 years ago
It is regression bug, I believe. We should escape special symbols.
Original comment by habamax
on 21 May 2012 at 6:06
Original comment by habamax
on 21 May 2012 at 4:12
rdc8f8e741194 fixes the highlighting of files with & , e.g. [[Test&File]]
Which characters are valid & invalid in filenames?
Here's my suggestion concerning the special characters that have previously
received attn. E.g. in vimwiki#base#file_pattern()
- valid '~&.'
- invalid '*'
- undecided '$'
Original comment by stu.andrews
on 21 May 2012 at 4:47
Original comment by stu.andrews
on 21 May 2012 at 4:54
Probably this link could be taken into account:
http://en.wikipedia.org/wiki/Wikipedia:Naming_conventions_(technical_restriction
s)
Original comment by habamax
on 21 May 2012 at 5:53
I will test filenames against different symbols on linux and windows.
Original comment by habamax
on 21 May 2012 at 5:53
btw,
valid symbols is those we should escape in filenames?
Original comment by habamax
on 21 May 2012 at 5:58
"Valid" = "accepted" = "handled" using whichever method is required for a given
operation (escaped, ...)
Original comment by stu.andrews
on 21 May 2012 at 9:14
I mean, symbols could be valid for filenames but not for regexps and vice versa.
Original comment by habamax
on 22 May 2012 at 4:42
I guess those 5 symbols are enough to be escaped for file patterns.
Should we restrict what symbols to use in filenames? I am not so sure.
Original comment by habamax
on 22 May 2012 at 5:10
Like I suggested earlier, our policy could be to aim (i.e. within Vimwiki) to
support *all* special characters, and force the user to choose names that are
compatible with any external restrictions that they encounter (e.g. filesystem,
wiki conventions, other syntaxes, ...).
So, in our code, we would escape all characters (and only those) that have
special meanings in those regexps ... regardless of whether or not it made
sense for a filename or not. Certain operations, like creating or renaming a
file, could be designed to fail gracefully if the filesystem complained ...
Do you think this approach is feasible?
Original comment by stu.andrews
on 22 May 2012 at 7:09
Yes, I agree. This approach is the best we can have here I believe.
Original comment by habamax
on 22 May 2012 at 7:44
a reminder
http://code.google.com/p/vimwiki/source/detail?r=81bdf76b7ef0d5c130dda4ce1fe0344
1b3e8ae21
Original comment by habamax
on 25 May 2012 at 3:32
\V doesn't quite work at the moment.
links with description are highlighted as nonexistent.
Original comment by habamax
on 25 May 2012 at 3:50
I have added \m (magic) to the end of 'files' pattern.
Original comment by habamax
on 25 May 2012 at 4:14
I have added a description to each of the issue316 links, and with
rb0d22a771b96, all of them are highlighted as existent and correctly show their
descriptions ... EXCEPT FOR:
1. [[issue316_\_i|hello]] which appears as plain text
2. "issue316_[_h|hello" appears as an existing link, incorrectly treating the
description as part of the url
3. "issue316_]_j|hello" is the same as 2.
Original comment by stu.andrews
on 25 May 2012 at 5:41
1. that is because of \. I think it is ok.
I have 2 and 3 as plain text... :)
I had it before \V so the problem is in smth else.
Original comment by habamax
on 26 May 2012 at 10:06
Fixed with r507d4aed9e0c.
I have to check it with windows.
Original comment by habamax
on 29 May 2012 at 4:45
Original comment by habamax
on 1 Jun 2012 at 11:09
Original issue reported on code.google.com by
stu.andrews
on 21 May 2012 at 4:41