On 25/01/11 12:31, Tim Mertens wrote:
On Jan 24, 2:48 pm, Stuart Rackham<[email protected]> wrote:
This gets round the 'spaces in file paths' problem and would be straight forward
to implement, but would the target syntax relaxation create significant
regression problems? It would also introduce an insidious line wrapping problem
that would require a change to asciidoc.py e.g.
// This won't work.
image:file name with
spaces.png[file
name with spaces]
I do not personally see what regressions this may cause. Any user who
previously used a space in the path name would result in the image tag
not being rendered correctly in the output, so they would have had to
remove spaces from their paths if they wanted to successfully export
their documentation. I did not notice any problems with images with
or without spaces when I tested this change. It worked in both
instances.
Also, can you describe the 'line wrapping problem' more fully? I am
not sure I understand the usage case you are describing. Using
'[\S ]' for matching instead of '\S' only adds the single whitespace
character ' ', and not other whitespace characters to the matching
such as \n, \t, \r, etc. So if the concern is matching multiple lines
and/or other whitespace characters besides ' ', I don't think this is
a problem.
You're right about the space, but the line wrapping will still be a problem e.g
if you have image:file name with spaces.png[] then reformatting the paragraph
could split the macro which would mean that the macro would not be matched i.e.
a document that worked fine would be silently broken by a minor edit somewhere
else in the paragraph (I'm referring to inline macros here).
Cheers, Stuart
Spaces in file paths are a perennial and universal source of bugs and
irritation, from little things like command-line quoting and mis-cutting and
pasting file names, right up to large programs.
My rule of thumb is simple *never include spaces in directory or file names* or
sooner or later you will be bitten.
Cheers, Stuart
Indeed, but unfortunately this is not always possible (as in my case)
and the lack of proper support for it has proved to be quite a pain.
Thanks,
-Tim
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.