aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-10-02 19:03:54 +0200
committerThomas White <taw@physics.org>2019-10-05 17:03:43 +0200
commit74ace225ceec792896b4c778c013830809d45d6d (patch)
tree070a0b2f30e184f27eaa45c1e0a00dfee7798b18
parenta0d9912fbc80cc1b54c50af756d84acd3be060e2 (diff)
Slides should not add themselves to the narrative
-rw-r--r--libstorycode/storycode.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/libstorycode/storycode.y b/libstorycode/storycode.y
index f53ee87..a0d4757 100644
--- a/libstorycode/storycode.y
+++ b/libstorycode/storycode.y
@@ -103,6 +103,7 @@
%token TEXT_START
%type <n> narrative
+%type <slide> slide
%type <slide> slide_parts
%type <ss> stylesheet
%type <slide_item> slide_part
@@ -250,7 +251,7 @@ narrative_el:
PRESTITLE TEXT_START text_line { narrative_add_prestitle(ctx->n, $3.runs, $3.n_runs); }
| BP TEXT_START text_line { narrative_add_bp(ctx->n, $3.runs, $3.n_runs); }
| TEXT_START text_line { narrative_add_text(ctx->n, $2.runs, $2.n_runs); }
-| slide { }
+| slide { narrative_add_slide(ctx->n, $1); }
| EOP { narrative_add_eop(ctx->n); }
;
@@ -308,7 +309,7 @@ one_or_more_runs:
/* -------- Slide -------- */
slide:
- SLIDE '{' slide_parts '}' { narrative_add_slide(ctx->n, $3); }
+ SLIDE '{' slide_parts '}' { $$ = $3; }
;
slide_parts: { $<slide>$ = slide_new(); }