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.profile = 'jinja'
|
||||
self.config.line_break_after_multiline_tag = True
|
||||
self.config.indent = " "
|
||||
|
||||
self.original_yaml = RougailUpgrade(rougailconfig).run(filename)
|
||||
datas = RougailUpgrade(rougailconfig).run(filename)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ variable:
|
|||
description: a variable
|
||||
default:
|
||||
jinja: >-
|
||||
{{test_information }}
|
||||
{{ test_information }}
|
||||
description: get information test_information
|
||||
params:
|
||||
test_information:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,11 @@ int1:
|
|||
type: number
|
||||
default:
|
||||
jinja: >-
|
||||
{% if rougail.bool %}1{% else %}2{% endif %}
|
||||
{% if rougail.bool %}
|
||||
1
|
||||
{% else %}
|
||||
2
|
||||
{% endif %}
|
||||
description: if bool returns 1 otherwise return 2
|
||||
|
||||
int2:
|
||||
|
|
@ -16,5 +20,9 @@ int2:
|
|||
type: number
|
||||
default:
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue