Inline substituion while maintaining white space

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Inline substituion while maintaining white space

jeffcpullen
I'm trying to figure out the best way to build a document that can be reused and shared while not sharing hostnames and IPs. The first problem I've run into is that if I use a block type that allows the substitution, it strips the white spaces and new lines making it unreadable. Does anyone have any suggestions for how to do both?

:server prefix: servername
:admin network: 192.168.0

====
      host {serverprefix}01 {
                option host-name
                hardware ethernet XX:XX:XX:XX:XX:XX;
                fixed-address {adminnetwork}.10;
      }
      host {serverprefix}02 {
                option host-name
                hardware ethernet XX:XX:XX:XX:XX:XX;
                fixed-address {adminnetwork}.11;
      }
====
Reply | Threaded
Open this post in threaded view
|

Re: Inline substituion while maintaining white space

LightGuardjp
Use a source block with substitutes enabled. On my phone, can't get the reference easily, but you'll find it in the user guide.

On Thursday, November 12, 2015, jeffcpullen [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I'm trying to figure out the best way to build a document that can be reused and shared while not sharing hostnames and IPs. The first problem I've run into is that if I use a block type that allows the substitution, it strips the white spaces and new lines making it unreadable. Does anyone have any suggestions for how to do both?

:server prefix: servername
:admin network: 192.168.0

====
      host {serverprefix}01 {
                option host-name
                hardware ethernet XX:XX:XX:XX:XX:XX;
                fixed-address {adminnetwork}.10;
      }
      host {serverprefix}02 {
                option host-name
                hardware ethernet XX:XX:XX:XX:XX:XX;
                fixed-address {adminnetwork}.11;
      }
====


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Inline-substituion-while-maintaining-white-space-tp3953.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;ml-node%2Bs49171n1h37@n6.nabble.com&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile
Reply | Threaded
Open this post in threaded view
|

Re: Inline substituion while maintaining white space

jeffcpullen
Thanks for pointing me in the right direction. Adding subs="normal" does exactly what I needed.

:server prefix: servername
:admin network: 192.168.0

[subs="normal"]
----
       host {serverprefix}01 {
                 option host-name
                 hardware ethernet XX:XX:XX:XX:XX:XX;
                 fixed-address {adminnetwork}.10;
       }
       host {serverprefix}02 {
                 option host-name
                 hardware ethernet XX:XX:XX:XX:XX:XX;
                 fixed-address {adminnetwork}.11;
      }
----

----- Original Message -----
From: "LightGuardjp [via Asciidoctor :: Discussion]" <[hidden email]>
To: "jeffcpullen" <[hidden email]>
Sent: Thursday, November 12, 2015 11:56:09 AM
Subject: Re: Inline substituion while maintaining white space



Use a source block with substitutes enabled. On my phone, can't get the
reference easily, but you'll find it in the user guide.

On Thursday, November 12, 2015, jeffcpullen [via Asciidoctor :: Discussion]
<[hidden email]> wrote:

> I'm trying to figure out the best way to build a document that can be
> reused and shared while not sharing hostnames and IPs. The first problem
> I've run into is that if I use a block type that allows the substitution,
> it strips the white spaces and new lines making it unreadable. Does anyone
> have any suggestions for how to do both?
>
> :server prefix: servername
> :admin network: 192.168.0
>
> ====
>       host {serverprefix}01 {
>                 option host-name
>                 hardware ethernet XX:XX:XX:XX:XX:XX;
>                 fixed-address {adminnetwork}.10;
>       }
>       host {serverprefix}02 {
>                 option host-name
>                 hardware ethernet XX:XX:XX:XX:XX:XX;
>                 fixed-address {adminnetwork}.11;
>       }
> ====
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://discuss.asciidoctor.org/Inline-substituion-while-maintaining-white-space-tp3953.html
> To start a new topic under Asciidoctor :: Discussion, email
> [hidden email]
> <javascript:_e(%7B%7D,'cvml','ml-node%[hidden email]');>
> To unsubscribe from Asciidoctor :: Discussion, click here
> <
> .
> NAML
> <
http://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
Sent from Gmail Mobile


_______________________________________________
If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Inline-substituion-while-maintaining-white-space-tp3953p3954.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Inline substituion while maintaining white space, visit
Reply | Threaded
Open this post in threaded view
|

Re: Inline substituion while maintaining white space

mojavelinux
Administrator
Please use subs="attributes+" instead. Otherwise, important substitutions get dropped. But you have the general idea. See:


On Thu, Nov 12, 2015 at 10:09 AM, jeffcpullen [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thanks for pointing me in the right direction. Adding subs="normal" does exactly what I needed.

:server prefix: servername
:admin network: 192.168.0

[subs="normal"]
----
       host {serverprefix}01 {
                 option host-name
                 hardware ethernet XX:XX:XX:XX:XX:XX;
                 fixed-address {adminnetwork}.10;
       }
       host {serverprefix}02 {
                 option host-name
                 hardware ethernet XX:XX:XX:XX:XX:XX;
                 fixed-address {adminnetwork}.11;
      }
----

----- Original Message -----
From: "LightGuardjp [via Asciidoctor :: Discussion]" <[hidden email]>
To: "jeffcpullen" <[hidden email]>
Sent: Thursday, November 12, 2015 11:56:09 AM
Subject: Re: Inline substituion while maintaining white space



Use a source block with substitutes enabled. On my phone, can't get the
reference easily, but you'll find it in the user guide.

On Thursday, November 12, 2015, jeffcpullen [via Asciidoctor :: Discussion]
<[hidden email]> wrote:

> I'm trying to figure out the best way to build a document that can be
> reused and shared while not sharing hostnames and IPs. The first problem
> I've run into is that if I use a block type that allows the substitution,
> it strips the white spaces and new lines making it unreadable. Does anyone
> have any suggestions for how to do both?
>
> :server prefix: servername
> :admin network: 192.168.0
>
> ====
>       host {serverprefix}01 {
>                 option host-name
>                 hardware ethernet XX:XX:XX:XX:XX:XX;
>                 fixed-address {adminnetwork}.10;
>       }
>       host {serverprefix}02 {
>                 option host-name
>                 hardware ethernet XX:XX:XX:XX:XX:XX;
>                 fixed-address {adminnetwork}.11;
>       }
> ====
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://discuss.asciidoctor.org/Inline-substituion-while-maintaining-white-space-tp3953.html
> To start a new topic under Asciidoctor :: Discussion, email
> [hidden email]
> <javascript:_e(%7B%7D,'cvml','ml-node%[hidden email]');>
> To unsubscribe from Asciidoctor :: Discussion, click here
> <

> .
> NAML
> <
http://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
Sent from Gmail Mobile


_______________________________________________
If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Inline-substituion-while-maintaining-white-space-tp3953p3954.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Inline substituion while maintaining white space, visit


To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen