a single newline) immediately after their opening brace; this was
causing a normal paragraph to be started, thus making it fiddly and
annoying to arrange the first paragraph of a \lcont to be a code
para or anything else special. Now fixed.
git-svn-id: svn://svn.tartarus.org/sgt/halibut@4005
cda61777-01e9-0310-a592-
d414129be87e
*/
dtor(t), t = get_token(in);
}
*/
dtor(t), t = get_token(in);
}
- if (t.type == tok_eop || t.type == tok_eof)
+ if (t.type == tok_eop || t.type == tok_eof ||
+ t.type == tok_rbrace) { /* might be } terminating \lcont */
+ if (t.type == tok_rbrace)
+ already = TRUE;
- else if (t.type == tok_cmd && t.cmd == c_c)
+ } else if (t.type == tok_cmd && t.cmd == c_c) {
- else if (t.type == tok_cmd && t.cmd == c_e &&
- wtype == word_WeakCode)
+ } else if (t.type == tok_cmd && t.cmd == c_e &&
+ wtype == word_WeakCode) {
error(err_brokencodepara, &t.pos);
prev_para_type = par.type;
addpara(par, ret);
error(err_brokencodepara, &t.pos);
prev_para_type = par.type;
addpara(par, ret);
+ /*
+ * Also expect, and swallow, any whitespace after that
+ * (a newline before a code paragraph wouldn't be
+ * surprising).
+ */
+ do {
+ dtor(t), t = get_token(in);
+ } while (t.type == tok_white);
+ already = TRUE;
+
if (cmd == c_lcont) {
/*
* \lcont causes a continuation of a list item into
if (cmd == c_lcont) {
/*
* \lcont causes a continuation of a list item into
\define{eur} \u20AC{EUR }
\define{eur} \u20AC{EUR }
-\versionid $Id: test.but,v 1.24 2004/03/30 19:40:56 simon Exp $
+\versionid $Id: test.but,v 1.25 2004/03/30 20:22:00 simon Exp $
\C{ch\\ap} First chapter title; for similar wrapping reasons this
chapter title will be ludicrously long. I wonder how much more
\C{ch\\ap} First chapter title; for similar wrapping reasons this
chapter title will be ludicrously long. I wonder how much more
+\lcont{
+\c Code
+\c Paragraph
+}
+
\n 1c.
\lcont{This is an even sillier one: a continuation of a list item in
\n 1c.
\lcont{This is an even sillier one: a continuation of a list item in