diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2016-09-19 23:23:30 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2016-09-19 23:23:30 +0200 |
| commit | a05d36f970a5c4723d2be3945076bce9347143ec (patch) | |
| tree | 94f5ca8fc2f479805edbc9252f09f5fbde9026ab /src/generators.c | |
| parent | aeefd1959aad3b80a0fe02083edbd5ebfb09510b (diff) | |
| download | cataract-a05d36f970a5c4723d2be3945076bce9347143ec.tar.xz | |
block-parser: Clear processed data for further use
This change will allow certain blocks to be present multiple times
and processed independently within a single page.
Diffstat (limited to 'src/generators.c')
| -rw-r--r-- | src/generators.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/generators.c b/src/generators.c index b9df04c..4648f49 100644 --- a/src/generators.c +++ b/src/generators.c @@ -1199,8 +1199,11 @@ write_html_page (TGallerySetup *setup, replace_table_process (&s1, global_replace_table); replace_table_add_key (global_replace_table, "IMG_LIST", s1); g_free (s1); - /* We don't use data from this key directly, let's mark it as used since we've built the structure we needed. */ - block_parser_set_as_used (block_parser, "IMG_LIST"); + /* Clear processed nested keys for further use */ + block_parser_clear_key_data (block_parser, "IMG_LIST"); + block_parser_clear_key_data (block_parser, "LIST_PICTURE"); + block_parser_clear_key_data (block_parser, "LIST_SEPARATOR"); + block_parser_clear_key_data (block_parser, "LIST_INTERSPACE"); } if (block_parser_has_unused_data (block_parser, "NAV_BAR")) { @@ -1210,7 +1213,12 @@ write_html_page (TGallerySetup *setup, replace_table_process (&s1, global_replace_table); replace_table_add_key (global_replace_table, "NAV_BAR", s1); g_free (s1); - block_parser_set_as_used (block_parser, "NAV_BAR"); + block_parser_clear_key_data (block_parser, "NAV_BAR"); + block_parser_clear_key_data (block_parser, "NAV_BAR_FIRST"); + block_parser_clear_key_data (block_parser, "NAV_BAR_ELEM"); + block_parser_clear_key_data (block_parser, "NAV_BAR_LAST"); + block_parser_clear_key_data (block_parser, "NAV_BAR_CURRENT"); + block_parser_clear_key_data (block_parser, "NAV_BAR_CURRENT_ROOT"); } /* Replace all known tags */ |
