Hi Josh
On 25/08/11 10:34, Josh Nylander wrote:
Ok, I have been all over this group and am familiar with
http://www.methods.co.nz/asciidoc/faq.html#X1 however I can not get any of the
following to work on Windows 7 using Python 2.7 and asciidoc v 8.6.5 (revision
*1c5738e76608
<http://code.google.com/p/asciidoc/source/detail?r=1c5738e76608f9115c104c57d798a6f876f7171f>*
).
What should work
include::test%20it.asciidoc[]
Other attempts:
include::test it.asciidoc[]
include::test\ it.asciidoc[]
include::test/ it.asciidoc[]
include::test_it.asciidoc[]
I know spaces are "bad" but they are difficult to avoid. Any help/ideas would be
great.
Spaces are not allowed in the macro target (see
http://www.methods.co.nz/asciidoc/userguide.html#_macros), but I take your point
that they are difficult to avoid. It would be easy to remove the restriction on
block macros (diff attached), though would result in a warning if existing
documents had lines like '<name>::<target>[<attrlist>]' and the target had spaces.
A work-around would be to define an attribute for the file name e.g.
:test-file: test it.asciidoc
include::{test-file}[]
Cheers, Stuart
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/asciidoc/-/UMpuraE7K4MJ.
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.
--
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.
diff -r 1c5738e76608 asciidoc.conf
--- a/asciidoc.conf Thu Aug 25 09:43:40 2011 +1200
+++ b/asciidoc.conf Thu Aug 25 11:35:24 2011 +1200
@@ -261,16 +261,16 @@
# Default (catchall) inline macro is not implemented so there is no ambiguity
# with previous definition that could result in double substitution of escaped
# references.
-#(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)\[(?P<passtext>.*?)(?<!\\)\]=
+#(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>.*?)\[(?P<passtext>.*?)(?<!\\)\]=
#-------------
# Block macros
#-------------
# Macros using default syntax.
-(?u)^(?P<name>image|unfloat)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=#
+(?u)^(?P<name>image|unfloat)::(?P<target>.*?)(\[(?P<attrlist>.*?)\])$=#
# Passthrough macros.
-(?u)^(?P<name>pass)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=#
+(?u)^(?P<name>pass)::(?P<subslist>.*?)(\[(?P<passtext>.*?)\])$=#
^'{3,}$=#ruler
^<{3,}$=#pagebreak
diff -r 1c5738e76608 asciidoc.py
--- a/asciidoc.py Thu Aug 25 09:43:40 2011 +1200
+++ b/asciidoc.py Thu Aug 25 11:35:24 2011 +1200
@@ -3679,7 +3679,7 @@
class Macros:
# Default system macro syntax.
- SYS_RE = r'(?u)^(?P<name>[\\]?\w(\w|-)*?)::(?P<target>\S*?)' + \
+ SYS_RE = r'(?u)^(?P<name>[\\]?\w(\w|-)*?)::(?P<target>.*?)' + \
r'(\[(?P<attrlist>.*?)\])$'
def __init__(self):
self.macros = [] # List of Macros.