RabidArts / asciidoc

Automatically exported from code.google.com/p/asciidoc
GNU General Public License v2.0
0 stars 0 forks source link

Allow open block to act as pass block #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
An open block can masquerade as any type of delimited block except a pass 
(passthrough) block. With a small addition to asciidoc.conf, an open block 
could work as a pass block when assigned the pass style.

For example, these two blocks should be equivalent:

++++
<h1>AsciiDoc</h1>
++++

and

[pass]
--
<h1>AsciiDoc</h1>
--

Here's the line that needs to be added to asciidoc.conf to support this feature:

[blockdef-open]
...
pass-style=template="passblock",subs=("attributes","macros")

We could also add another one that disables all subs

[blockdef-open]
...
pass_-style=template="passblock",subs=()

I'm not sure how to make the subs something that can be controlled from the 
markup.

Original issue reported on code.google.com by dan.j.allen on 16 Mar 2013 at 12:55

GoogleCodeExporter commented 9 years ago
I realized that the reason my subs attribute isn't being interpreted is because 
I'm not quoting the style. This works to disable substitutions:

["pass", subs="none"]
--
<p>{docfile}</p>
--

Original comment by dan.j.allen on 16 Mar 2013 at 6:58