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; } ==== |
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? -- Sent from Gmail Mobile |
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 |
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. Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen |
Free forum by Nabble | Edit this page |