diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-06-16 19:13:28 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-06-16 19:13:28 +0000 |
commit | 632038c8c98f1c408bb368edf910b849f186dc8a (patch) | |
tree | 000479224756a6b4a7749394e9208b7308c220ab /mdoc.c | |
parent | b06a75d0798f3ff62d04b3ade52cf34a4ff94613 (diff) | |
download | mandoc-632038c8c98f1c408bb368edf910b849f186dc8a.tar.gz mandoc-632038c8c98f1c408bb368edf910b849f186dc8a.tar.zst mandoc-632038c8c98f1c408bb368edf910b849f186dc8a.zip |
Modernised comment handling: text following \" is thrown away before
either parser is invoked. Single-dot lines correctly handled. This
confirms with both new- and old-groff. "Comment" subsection added to
mdoc.7 and man.7.
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.80 2009/06/15 10:36:01 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.81 2009/06/16 19:13:28 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -657,7 +657,7 @@ parsemacro(struct mdoc *m, int ln, char *buf) int i, c; char mac[5]; - /* Comments and empties are quickly ignored. */ + /* Empty lines are ignored. */ if (0 == buf[1]) return(1); @@ -671,10 +671,6 @@ parsemacro(struct mdoc *m, int ln, char *buf) return(perr(m, ln, 1, ESPACE)); } - if (buf[1] && '\\' == buf[1]) - if (buf[2] && '\"' == buf[2]) - return(1); - /* Copy the first word into a nil-terminated buffer. */ for (i = 1; i < 5; i++) { |