diff options
author | Stuart Rackham <srackham@methods.co.nz> | 2009-03-18 17:27:25 +1300 |
---|---|---|
committer | Stuart Rackham <srackham@methods.co.nz> | 2009-03-18 17:27:25 +1300 |
commit | 3dd721be7af950b71d296d7bc6b2e7aaf1518db6 (patch) | |
tree | b8ee88be8a10f3628ddf88182a318205cd5eb958 | |
parent | b7f1a5f867cf0eb3f81e953810653d289b1a98e2 (diff) | |
download | asciidoc-py3-3dd721be7af950b71d296d7bc6b2e7aaf1518db6.tar.gz |
Warning if nested inline passthroughs encountered.
-rwxr-xr-x | asciidoc.py | 3 | ||||
-rw-r--r-- | tests/data/testcases.txt | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/asciidoc.py b/asciidoc.py index ca9f03e..ab1aa30 100755 --- a/asciidoc.py +++ b/asciidoc.py @@ -3291,6 +3291,9 @@ class Macro: d.get('name','')) return mo.group() passtext = d['passtext'] + if re.search('\x07\\d+\x07', passtext): + warning('nested inline passthrough') + return mo.group() if d.get('subslist'): if d['subslist'].startswith(':'): error('block macro cannot occur here: %s' % mo.group(), diff --git a/tests/data/testcases.txt b/tests/data/testcases.txt index 521310d..3b8552d 100644 --- a/tests/data/testcases.txt +++ b/tests/data/testcases.txt @@ -117,3 +117,11 @@ label:: item text label::: item text label:::: item text + +== Inline passthroughs == +- Test `pass:[ABC]`. +- The `++i` and `++j` auto-increments. +- Paths `~/.vim` and `~/docs`. +- The `__init__` method. +- The `{id}` attribute. + |