From 5a9505f48aeb252d1a316b3cecc0b1da9d510085 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 21 Oct 1999 13:26:48 +0000 Subject: Now handle \\, \{ and \} in paragraph keywords [originally from svn r241] --- input.c | 4 +++- inputs/test.but | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/input.c b/input.c index d5c4685..1f40912 100644 --- a/input.c +++ b/input.c @@ -557,7 +557,9 @@ static void read_file(paragraph ***ret, input *in, index *idx) { /* FIXME: there will be bugs if anyone specifies an * empty keyword (\foo{}), so trap this case. */ while (dtor(t), t = get_token(in), - t.type == tok_word || t.type == tok_white) { + t.type == tok_word || + t.type == tok_white || + (t.type == tok_cmd && t.cmd == c__escaped)) { if (t.type == tok_white) rdadd(&rs, ' '); else diff --git a/inputs/test.but b/inputs/test.but index 0be237d..57fcea2 100644 --- a/inputs/test.but +++ b/inputs/test.but @@ -7,9 +7,9 @@ date \date{%Y.%m.%d} (default format is \date). \copyright Copyright 1999 Simon \#{second comment}Tatham. All rights reserved. -\versionid $Id: test.but,v 1.6 1999/09/12 15:38:06 simon Exp $ +\versionid $Id: test.but,v 1.7 1999/10/21 13:26:48 simon Exp $ -\C{chap} First chapter title +\C{ch\\ap} First chapter title This is a para\#{another{} comment}graph of text. It has line\#{yet another one} breaks in between words, multiple -- cgit v1.1