Commit fd5759ff authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1a2839ad
......@@ -23,11 +23,11 @@
{#- XXX what to return ? #}
{%- else %}
{%- do seen.append(cell_ref) %}
{%- set ru = cell['ru'] %}
{%- set ru = J(cell['_'])['ru'] %}
{%- if ru['ru_type'] == 'ru_ref' %}
{{- ru['ru_ref'] | tojson }}
{%- elif ru['ru_type'] == 'ruincell_ref' %}
{{- jcell_ru_ref(ru['ruincell_ref']) }}
{{- _jcell_ru_ref(ru['ruincell_ref'], seen) }}
{%- else %}
{#- ru definition is embedded into cell #}
{{- ('_%s_ru' % J(jref_of_shared(cell))) | tojson }}
......@@ -72,11 +72,13 @@
{%- endfor %}
{{ print('\nru_dict:') }} {{ pprint(ru_dict) }}
{{ print('\ncell_dict:') }} {{ pprint(cell_dict) }}
{{ print('\n----\n') }}
{#- verify that there is no dangling cell->ru references #}
{%- for _, cell in cell_dict|dictsort %}
{{ print('_:', _, 'cell:', cell) }}
{%- set ru_ref = J(jcell_ru_ref(cell)) %}
{%- if ru_ref not in ru_dict %}
{%- do error(cell, "referred RU %s does not exist" % ru_ref) %}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment