* mandoc: Small bug fix: Percent macros only get automatic trailing
@ 2025-01-24 22:37 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2025-01-24 22:37 UTC (permalink / raw)
To: source
Log Message:
-----------
Small bug fix:
Percent macros only get automatic trailing punctuation inside .Rs blocks.
This was already correctly implemented for other output modes.
Modified Files:
--------------
mandoc:
mdoc_man.c
Revision Data
-------------
Index: mdoc_man.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_man.c,v
diff -Lmdoc_man.c -Lmdoc_man.c -u -p -r1.138 -r1.139
--- mdoc_man.c
+++ mdoc_man.c
@@ -1,6 +1,6 @@
/* $Id$ */
/*
- * Copyright (c) 2011-2021 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2011-2021, 2025 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
@@ -795,6 +795,9 @@ post_percent(DECL_ARGS)
if (mdoc_man_act(n->tok)->pre == pre_em)
font_pop();
+
+ if (n->parent == NULL || n->parent->tok != MDOC_Rs)
+ return;
if ((nn = roff_node_next(n)) != NULL) {
np = roff_node_prev(n);
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-24 22:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-24 22:37 mandoc: Small bug fix: Percent macros only get automatic trailing schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).