From cdd525eda52b1c688d0905bf0184c66f4a893611 Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Sun, 12 Feb 2017 18:28:14 -0500 Subject: [PATCH] FIXED: Fix issue printing '-' --- src/latex.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/latex.c b/src/latex.c index ce46ba0..67c9b94 100644 --- a/src/latex.c +++ b/src/latex.c @@ -998,6 +998,11 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat } break; case PAIR_MATH: + // Math is raw LaTeX -- use string itself + mmd_export_token_latex(out, source, t->child, scratch); + d_string_append_c_array(out, &(source[t->child->start + t->child->len]), t->child->mate->start - t->child->start - t->child->len); + mmd_export_token_latex(out, source, t->child->mate, scratch); + break; case PAIR_PAREN: case PAIR_QUOTE_DOUBLE: case PAIR_QUOTE_SINGLE: @@ -1135,7 +1140,11 @@ void mmd_export_token_latex_raw(DString * out, const char * source, token * t, s print("$>$"); break; case DASH_N: - print("-{}-"); + if (t->len == 1) { + print("-"); + } else { + print("-{}-"); + } break; case DASH_M: print("-{}-{}-"); -- 2.40.0