fix: if and for in 3 lines
This commit is contained in:
parent
4e9e8b082e
commit
c09800521c
53 changed files with 83 additions and 73 deletions
|
|
@ -78,6 +78,8 @@ class RougailOutputFormatter:
|
||||||
|
|
||||||
self.config = Config()
|
self.config = Config()
|
||||||
self.config.profile = 'jinja'
|
self.config.profile = 'jinja'
|
||||||
|
self.config.line_break_after_multiline_tag = True
|
||||||
|
self.config.indent = " "
|
||||||
|
|
||||||
self.original_yaml = RougailUpgrade(rougailconfig).run(filename)
|
self.original_yaml = RougailUpgrade(rougailconfig).run(filename)
|
||||||
datas = RougailUpgrade(rougailconfig).run(filename)
|
datas = RougailUpgrade(rougailconfig).run(filename)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ variable:
|
||||||
description: a variable
|
description: a variable
|
||||||
default:
|
default:
|
||||||
jinja: >-
|
jinja: >-
|
||||||
{{test_information }}
|
{{ test_information }}
|
||||||
description: get information test_information
|
description: get information test_information
|
||||||
params:
|
params:
|
||||||
test_information:
|
test_information:
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,11 @@ int1:
|
||||||
type: number
|
type: number
|
||||||
default:
|
default:
|
||||||
jinja: >-
|
jinja: >-
|
||||||
{% if rougail.bool %}1{% else %}2{% endif %}
|
{% if rougail.bool %}
|
||||||
|
1
|
||||||
|
{% else %}
|
||||||
|
2
|
||||||
|
{% endif %}
|
||||||
description: if bool returns 1 otherwise return 2
|
description: if bool returns 1 otherwise return 2
|
||||||
|
|
||||||
int2:
|
int2:
|
||||||
|
|
@ -16,5 +20,9 @@ int2:
|
||||||
type: number
|
type: number
|
||||||
default:
|
default:
|
||||||
jinja: >-
|
jinja: >-
|
||||||
{% if not rougail.bool %}3{% else %}4{% endif %}
|
{% if not rougail.bool %}
|
||||||
|
3
|
||||||
|
{% else %}
|
||||||
|
4
|
||||||
|
{% endif %}
|
||||||
description: if bool returns 3 otherwise return 4
|
description: if bool returns 3 otherwise return 4
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue