Skip to content

Commit

Permalink
Serialize region typology in PageXML
Browse files Browse the repository at this point in the history
Resolves #621
  • Loading branch information
mittagessen committed Jul 8, 2024
1 parent aaf2b7a commit 7f322f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kraken/templates/pagexml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{% if loop.previtem and loop.previtem.type == 'line' %}
</TextRegion>
{% endif %}
<TextRegion id="{{ entity.id }}" custom="structure {type:{{ entity.region_type }};}">
<TextRegion id="{{ entity.id }}" {% if entity.tags and "type" in entity.tags %}custom="structure {type:{{ entity.tags["type"] }};}"{% endif %}>
{% if entity.boundary %}<Coords points="{% for point in entity.boundary %}{{ point|join(',') }}{% if not loop.last %} {% endif %}{% endfor %}"/>{% endif %}
{%- for line in entity.lines -%}
{{ render_line(line) }}
Expand Down

0 comments on commit 7f322f0

Please sign in to comment.