aboutsummaryrefslogtreecommitdiff
path: root/eqn.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2021-11-15 15:35:39 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2021-11-15 15:35:39 +0000
commite9bf778aefc154b6bdefd2772f7fd85819f465b1 (patch)
treee47699afedf03da33f8556a140426379495987dd /eqn.c
parenta5efdeedef481aea3632844ca94a80567a75b5ad (diff)
downloadsrc-e9bf778aefc154b6bdefd2772f7fd85819f465b1.tar.gz
src-e9bf778aefc154b6bdefd2772f7fd85819f465b1.zip
mandoc: import v1.14.6vendor/mandoc/1.14.6vendor/mandoc
Diffstat (limited to 'eqn.c')
-rw-r--r--eqn.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/eqn.c b/eqn.c
index 3d63382ab31b..27f5cac396cb 100644
--- a/eqn.c
+++ b/eqn.c
@@ -1,7 +1,7 @@
-/* $Id: eqn.c,v 1.83 2018/12/14 06:33:14 schwarze Exp $ */
+/* $Id: eqn.c,v 1.84 2020/01/08 12:16:24 schwarze Exp $ */
/*
* Copyright (c) 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2014, 2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2014,2015,2017,2018,2020 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -399,6 +399,14 @@ eqn_next(struct eqn_node *ep, enum parse_mode mode)
case '"':
quoted = 1;
break;
+ case ' ':
+ case '\t':
+ case '~':
+ case '^':
+ if (quoted)
+ break;
+ ep->start++;
+ continue;
default:
break;
}
@@ -669,7 +677,7 @@ eqn_parse(struct eqn_node *ep)
if (ep->data == NULL)
return;
- ep->start = ep->end = ep->data + strspn(ep->data, " ^~");
+ ep->start = ep->end = ep->data;
next_tok:
tok = eqn_next(ep, MODE_TOK);