changeset 12136:8f2e47faee88

skip {...} parts in SAME subs, patch by Salvatore Falco
author alex
date Tue, 06 Apr 2004 11:22:06 +0000
parents ec3c9fe261b9
children 9f297a651e11
files subreader.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/subreader.c	Tue Apr 06 06:36:46 2004 +0000
+++ b/subreader.c	Tue Apr 06 11:22:06 2004 +0000
@@ -144,6 +144,7 @@
 		    current->text[current->lines++] = strdup (text);
 		s += 4;
 	    }
+	    else if ((*s == '{') && !sub_no_text_pp) { state = 5; ++s; continue; }
 	    else if (*s == '<') { state = 4; }
 	    else if (!strncasecmp (s, "&nbsp;", 6)) { *p++ = ' '; s += 6; }
 	    else if (*s == '\t') { *p++ = ' '; s++; }
@@ -168,6 +169,10 @@
 	    s = strchr (s, '>');
 	    if (s) { s++; state = 3; continue; }
 	    break;
+	case 5: /* get rid of {...} text */
+	    if (*s == '}') state = 3;
+	    ++s;
+	    continue;
 	}
 
 	/* read next line */