Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Controling whitespace in jinja2 macro
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jānis Ģeņģeris  
View profile  
 More options Oct 23 2012, 5:18 am
From: Jānis Ģeņģeris <janis.genge...@gmail.com>
Date: Tue, 23 Oct 2012 02:18:03 -0700 (PDT)
Local: Tues, Oct 23 2012 5:18 am
Subject: Controling whitespace in jinja2 macro

Hello.

How to control whitespace inside a macro?

I have the following jinja2 macro http://pastebin.com/CDsT2wMw, and when
net_gw or net_bcast is not present I got an empty
line, like here :
http://pastebin.com/q3SsTxs8

, but I would like to have the empty line removed from the final
replacement and have the output as here:
http://pastebin.com/vhDfT4mA

Is it possible to do that?

Regards,
--janis


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.