Commit fd5759ff authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1a2839ad
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
{#- XXX what to return ? #} {#- XXX what to return ? #}
{%- else %} {%- else %}
{%- do seen.append(cell_ref) %} {%- do seen.append(cell_ref) %}
{%- set ru = cell['ru'] %} {%- set ru = J(cell['_'])['ru'] %}
{%- if ru['ru_type'] == 'ru_ref' %} {%- if ru['ru_type'] == 'ru_ref' %}
{{- ru['ru_ref'] | tojson }} {{- ru['ru_ref'] | tojson }}
{%- elif ru['ru_type'] == 'ruincell_ref' %} {%- elif ru['ru_type'] == 'ruincell_ref' %}
{{- jcell_ru_ref(ru['ruincell_ref']) }} {{- _jcell_ru_ref(ru['ruincell_ref'], seen) }}
{%- else %} {%- else %}
{#- ru definition is embedded into cell #} {#- ru definition is embedded into cell #}
{{- ('_%s_ru' % J(jref_of_shared(cell))) | tojson }} {{- ('_%s_ru' % J(jref_of_shared(cell))) | tojson }}
...@@ -72,11 +72,13 @@ ...@@ -72,11 +72,13 @@
{%- endfor %} {%- endfor %}
{{ print('\nru_dict:') }} {{ pprint(ru_dict) }} {{ print('\nru_dict:') }} {{ pprint(ru_dict) }}
{{ print('\ncell_dict:') }} {{ pprint(cell_dict) }} {{ print('\ncell_dict:') }} {{ pprint(cell_dict) }}
{{ print('\n----\n') }}
{#- verify that there is no dangling cell->ru references #} {#- verify that there is no dangling cell->ru references #}
{%- for _, cell in cell_dict|dictsort %} {%- for _, cell in cell_dict|dictsort %}
{{ print('_:', _, 'cell:', cell) }}
{%- set ru_ref = J(jcell_ru_ref(cell)) %} {%- set ru_ref = J(jcell_ru_ref(cell)) %}
{%- if ru_ref not in ru_dict %} {%- if ru_ref not in ru_dict %}
{%- do error(cell, "referred RU %s does not exist" % ru_ref) %} {%- 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