summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-01-05 22:56:40 +0000
committerKarl Berry <karl@freefriends.org>2017-01-05 22:56:40 +0000
commitf78056943ffe36621ca1cf595657f324cda9b13f (patch)
tree99a8c163e460573cbc8d0e27f501edd20177d1d7 /Master/texmf-dist/tex/context
parent34a0db48cc3c734ab21f489d2f710e74a3fda6af (diff)
markdown (5jan17)
git-svn-id: svn://tug.org/texlive/trunk@42868 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context')
-rw-r--r--Master/texmf-dist/tex/context/third/markdown/t-markdown.tex30
1 files changed, 9 insertions, 21 deletions
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}}%