From 593cf814d27b3c2acbe41bce7d9b567278238647 Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Sun, 12 Feb 2017 22:10:02 -0500 Subject: [PATCH] FIXED: Properly print hash characters in LaTeX --- src/latex.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/latex.c b/src/latex.c index df6e573..c5abdeb 100644 --- a/src/latex.c +++ b/src/latex.c @@ -644,8 +644,12 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat case HASH6: for (int i = 0; i < t->len; ++i) { - print_char('\\'); - print_char('#'); + if (source[t->start + i] == '#') { + print_char('\\'); + print_char('#'); + } else { + mmd_print_char_latex(out, source[t->start + i]); + } } break; case INDENT_SPACE: -- 2.40.0