diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-24 14:41:49 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-24 14:41:49 +0200 |
commit | 4d9706d81ef5415556289c97f3fbaa899816070c (patch) | |
tree | c62ecfc85b2050fecb54d717a8c10466cb73104d | |
parent | b8b194ea5fa6ba7a3aac7ff212eb62ccfb942dbf (diff) |
Implement support for n-dash, \-
-rw-r--r-- | cli/context.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cli/context.cxx b/cli/context.cxx index b3aebc8..5731222 100644 --- a/cli/context.cxx +++ b/cli/context.cxx @@ -347,6 +347,32 @@ format_line (output_type ot, string& r, const char* s, size_t n) switch (c) { + case '-': + { + // N-dash. If someone wants m-dash, can use \-- with \-{}- as + // a way to "escape" an n-dash followed by hyphen. + // + switch (ot) + { + case ot_plain: + { + r += "--"; + break; + } + case ot_html: + { + r += "–"; + break; + } + case ot_man: + { + r += "\\(en"; + break; + } + } + + break; + } case 'n': { switch (ot) |