Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
f86fba79
Commit
f86fba79
authored
Jan 17, 2024
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
50c1dafa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
software/ors-amarisoft/slaplte.jinja2
software/ors-amarisoft/slaplte.jinja2
+22
-22
No files found.
software/ors-amarisoft/slaplte.jinja2
View file @
f86fba79
...
...
@@ -298,29 +298,29 @@
{#- jcell_ru_ref returns RU reference linked from a cell.
if the cell embeds RU definition, its reference comes as `_<cell_ref>_ru`. #}
{%- macro jcell_ru_ref(icell, icell_dict)
%}
{{- _jcell_ru_ref(icell, icell_dict, [])
}}
{%- endmacro
%}
{%- macro _jcell_ru_ref(icell, icell_dict, seen)
%}
{%- set cell_ref = J(jref_of_shared(icell))
%}
{%- if cell_ref in seen
%}
{%- for x in seen
%}
{%- do ierror(x, "%s form a cycle via RU references" % seen)
%}
{%- endfor
%}
{
#- XXX what to return ? #
}
{%- else
%}
{%- do seen.append(cell_ref)
%}
{%- set ru = icell['_']['ru']
%}
{%- if ru.ru_type == 'ru_ref'
%}
{{- ru.ru_ref | tojson
}}
{%- elif ru.ru_type == 'ruincell_ref'
%}
{%- macro jcell_ru_ref(icell, icell_dict) %}
{{- _jcell_ru_ref(icell, icell_dict, []) }}
{%- endmacro %}
{%- macro _jcell_ru_ref(icell, icell_dict, seen) %}
{%- set cell_ref = J(jref_of_shared(icell)) %}
{%- if cell_ref in seen %}
{%- for x in seen %}
{%- do ierror(x, "%s form a cycle via RU references" % seen) %}
{%- endfor %}
{
{- None | tojson }
}
{%- else %}
{%- do seen.append(cell_ref) %}
{%- set ru = icell['_']['ru'] %}
{%- if ru.ru_type == 'ru_ref' %}
{{- ru.ru_ref | tojson }}
{%- elif ru.ru_type == 'ruincell_ref' %}
{{- _jcell_ru_ref(icell_dict[ru.ruincell_ref], icell_dict, seen) }}
{%- else
%}
{#- ru definition is embedded into cell
#}
{{- ('_%s_ru' % J(jref_of_shared(icell))) | tojson
}}
{%- endif
%}
{%- endif
%}
{%- endmacro %}
{%- else %}
{#- ru definition is embedded into cell #}
{{- ('_%s_ru' % J(jref_of_shared(icell))) | tojson }}
{%- endif %}
{%- endif %}
{%- endmacro
%}
{#- jref_of_shared returns original reference used to request shared instance.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment