From 25ae2ba76e6b3e0d1c45d426d8ddd7d3b84a5cda Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 4 Mar 2018 13:48:41 +0200 Subject: Add "\ " escaping to specify non-ignorable space This can used to manually align things (e.g., in synopsis) but will only work if the entire lines are in \c{}. --- cli/context.cxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'cli') diff --git a/cli/context.cxx b/cli/context.cxx index f54c474..d2daab4 100644 --- a/cli/context.cxx +++ b/cli/context.cxx @@ -437,6 +437,31 @@ format_line (output_type ot, string& r, const char* s, size_t n) switch (c) { + case ' ': + { + // Non-ignorable space. + // + switch (ot) + { + case ot_plain: + { + r += ' '; + break; + } + case ot_html: + { + r += " "; + break; + } + case ot_man: + { + r += "\\ "; + break; + } + } + + break; + } case '-': { // N-dash. If someone wants m-dash, can use \-- with \-{}- as -- cgit v1.1