diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-09-29 13:04:26 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-09-29 13:04:26 +0000 |
| commit | 4a4d009cbba73b06e8b16fdf8f8f59e712a4bc6f (patch) | |
| tree | bd35d0b7ede0517d9e223ddcaf66b0984ba684fa | |
| parent | e1a1d840b82db8a3b93e112e94e55f761c2b6dba (diff) | |
| download | halibut-4a4d009cbba73b06e8b16fdf8f8f59e712a4bc6f.zip halibut-4a4d009cbba73b06e8b16fdf8f8f59e712a4bc6f.tar.gz halibut-4a4d009cbba73b06e8b16fdf8f8f59e712a4bc6f.tar.bz2 halibut-4a4d009cbba73b06e8b16fdf8f8f59e712a4bc6f.tar.xz | |
Remove the error message `no text found in paragraph'. Aaron Brown
points out that it's perfectly possible to generate an empty
paragraph using legal Halibut syntax: a paragraph containing nothing
but a \#{...} comment will do the job, and is quite likely to happen
if you've commented out a load of Halibut code. Therefore, an empty
paragraph is now silently ignored rather than being an error
condition in itself; if you create an empty paragraph due to it
containing an unrecognised directive, then you'll get an error for
_that_ and only that.
[originally from svn r6361]
Diffstat (limited to '')
| -rw-r--r-- | error.c | 5 | ||||
| -rw-r--r-- | halibut.h | 1 | ||||
| -rw-r--r-- | input.c | 2 | ||||
| -rw-r--r-- | inputs/test.but | 2 |
4 files changed, 2 insertions, 8 deletions
@@ -278,11 +278,6 @@ static void do_error(int code, va_list ap) { flags = FILEPOS; sfree(sp); break; - case err_emptypara: - fpos = *va_arg(ap, filepos *); - sprintf(error, "found no text in paragraph"); - flags = FILEPOS; - break; case err_whatever: sp = va_arg(ap, char *); vsprintf(error, sp, ap); @@ -244,7 +244,6 @@ enum { err_text_codeline, /* \c line too long in text backend */ err_htmlver, /* unrecognised HTML version keyword */ err_charset, /* unrecognised character set name */ - err_emptypara, /* paragraph contains no actual text */ err_whatever /* random error of another type */ }; @@ -1539,8 +1539,6 @@ static void read_file(paragraph ***ret, input *in, indexdata *idx, */ if (par.words) { addpara(par, ret); - } else { - error(err_emptypara, &par.fpos); } if (t.type == tok_eof) already = TRUE; diff --git a/inputs/test.but b/inputs/test.but index 4682d5f..2088de4 100644 --- a/inputs/test.but +++ b/inputs/test.but @@ -43,6 +43,8 @@ has line\#{yet another one} breaks in between words, multiple spaces (ignored), and \e{emphasised text} as well as \c{code fragments}. +\#{This is an inline comment alone in a paragraph.} + \cw{This} is weak code; \cq{this} is quoted code. And \k{head} contains some other stuff. \K{subhead} does too. |