From f78056943ffe36621ca1cf595657f324cda9b13f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 5 Jan 2017 22:56:40 +0000 Subject: markdown (5jan17) git-svn-id: svn://tug.org/texlive/trunk@42868 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/context/third/markdown/t-markdown.tex | 30 +++++++--------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'Master/texmf-dist/tex/context/third') diff --git a/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex b/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex index 4f90f3b8f8f..91e89c1dc20 100644 --- a/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex +++ b/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex @@ -51,26 +51,14 @@ \let\stopmarkdown\relax \def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\_\do\%\do\~}% -\ifx\directlua\undefined - \input markdown -\else - \directlua{% - local function unescape(str) - return (str:gsub("|", string.char(92))) end - local old_callback = callback.find("process_input_buffer") - callback.register("process_input_buffer", function() end) - local new_callback = callback.find("process_input_buffer") - if new_callback == false then - tex.print(unescape([[|def|markdownMode{1}|input markdown]])) - else - callback.register("process_input_buffer", old_callback) - tex.print(unescape("|input markdown")) - end}% -\fi -\ifnum\markdownMode<2\relax - \def\markdownMakeOther{% - \catcode`|=12}% -\fi +\input markdown +\def\markdownMakeOther{% + \count0=128\relax + \loop + \catcode\count0=11\relax + \advance\count0 by 1\relax + \ifnum\count0<256\repeat + \catcode`|=12}% \def\markdownInfo#1{\writestatus{markdown}{#1.}}% \def\markdownWarning#1{\writestatus{markdown\space warn}{#1.}}% \begingroup @@ -132,7 +120,7 @@ \def\markdownRendererDlEndTightPrototype{% \stopMarkdownConTeXtDlTightPrototype}% \def\markdownRendererEmphasisPrototype#1{{\em#1}}% -\def\markdownRendererStrongEmphasisPrototype#1{{\bf\em#1}}% +\def\markdownRendererStrongEmphasisPrototype#1{{\bf#1}}% \def\markdownRendererBlockQuoteBeginPrototype{\startquotation}% \def\markdownRendererBlockQuoteEndPrototype{\stopquotation}% \def\markdownRendererInputVerbatimPrototype#1{\typefile{#1}}% -- cgit v1.2.3