aboutsummaryrefslogtreecommitdiff
path: root/src/sc_interp.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2018-03-07 20:10:41 +0100
committerThomas White <taw@bitwiz.org.uk>2018-03-07 20:10:41 +0100
commitf4c56706bc083f9792420fb1af2ae8cdf9651bb7 (patch)
tree8dbcdabec3f151d7d517827e04fac9047fe0081f /src/sc_interp.c
parent74ad51de1a6dc74b9c253c254cccfe543d0c69b0 (diff)
Don't create runs for \newpara
Removes a load more special cases
Diffstat (limited to 'src/sc_interp.c')
-rw-r--r--src/sc_interp.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/sc_interp.c b/src/sc_interp.c
index 921bf94..006046d 100644
--- a/src/sc_interp.c
+++ b/src/sc_interp.c
@@ -954,7 +954,6 @@ static int add_text(struct frame *fr, PangoContext *pc, SCBlock *bl,
/* Empty block? */
if ( text == NULL ) return 1;
- if ( strlen(text) == 0 ) return 1;
fontdesc = sc_interp_get_fontdesc(scin);
col = sc_interp_get_fgcol(scin);
@@ -1021,8 +1020,7 @@ static int check_outputs(SCBlock *bl, SCInterpreter *scin)
set_frame_default_style(fr, scin);
- parse_frame_options(fr, sc_interp_get_frame(scin),
- options);
+ parse_frame_options(fr, sc_interp_get_frame(scin), options);
maybe_recurse_before(scin, child);
set_frame(scin, fr);
@@ -1031,13 +1029,7 @@ static int check_outputs(SCBlock *bl, SCInterpreter *scin)
} else if ( strcmp(name, "newpara")==0 ) {
struct frame *fr = sc_interp_get_frame(scin);
- Paragraph *para = last_open_para(fr);
-
- /* Add a dummy run which we can type into */
- add_run(para, bl, bl, 0, sc_interp_get_fontdesc(scin), fr->col);
-
- set_newline_at_end(para, bl);
- close_last_paragraph(fr);
+ add_newpara(fr, bl);
} else {
return 0;