summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-08-29 21:19:56 +0000
committerKarl Berry <karl@freefriends.org>2016-08-29 21:19:56 +0000
commit835ae450df95b8a97500efebbe995d9950c4e2b2 (patch)
tree2f9de4b0d4669f42f478401ce48926bed745aca0 /Master/texmf-dist/tex/context
parent8d7f98b66885b8a8f5e0cccb43f7c97060affb01 (diff)
markdown (29aug16)
git-svn-id: svn://tug.org/texlive/trunk@41950 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.tex42
1 files changed, 25 insertions, 17 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 bad0124577b..4f90f3b8f8f 100644
--- a/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex
+++ b/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex
@@ -67,7 +67,7 @@
tex.print(unescape("|input markdown"))
end}%
\fi
-\ifnum\markdownMode<2
+\ifnum\markdownMode<2\relax
\def\markdownMakeOther{%
\catcode`|=12}%
\fi
@@ -90,10 +90,10 @@
\def\markdownRendererBackslashPrototype{\textbackslash}%
\def\markdownRendererTildePrototype{\textasciitilde}%
\def\markdownRendererPipePrototype{\char`|}%
-\long\def\markdownRendererLinkPrototype#1#2#3#4{%
+\def\markdownRendererLinkPrototype#1#2#3#4{%
\useURL[#1][#3][][#4]#1\footnote[#1]{\ifx\empty#4\empty\else#4:
\fi\tt<\hyphenatedurl{#3}>}}%
-\long\def\markdownRendererImagePrototype#1#2#3#4{%
+\def\markdownRendererImagePrototype#1#2#3#4{%
\placefigure[][fig:#1]{#4}{\externalfigure[#3]}}%
\def\markdownRendererUlBeginPrototype{\startitemize}%
\def\markdownRendererUlBeginTightPrototype{\startitemize[packed]}%
@@ -103,11 +103,11 @@
\def\markdownRendererOlBeginPrototype{\startitemize[n]}%
\def\markdownRendererOlBeginTightPrototype{\startitemize[packed,n]}%
\def\markdownRendererOlItemPrototype{\item}%
-\long\def\markdownRendererOlItemWithNumberPrototype#1{\sym{#1.}}%
+\def\markdownRendererOlItemWithNumberPrototype#1{\sym{#1.}}%
\def\markdownRendererOlEndPrototype{\stopitemize}%
\def\markdownRendererOlEndTightPrototype{\stopitemize}%
\definedescription
- [markdownConTeXtDlItemPrototype]
+ [MarkdownConTeXtDlItemPrototype]
[location=hanging,
margin=standard,
headstyle=bold]%
@@ -123,26 +123,34 @@
\startMarkdownConTeXtDlPrototype}%
\def\markdownRendererDlBeginTightPrototype{%
\startMarkdownConTeXtDlTightPrototype}%
-\long\def\markdownRendererDlItemPrototype#1{%
- \markdownConTeXtDlItemPrototype{#1}}%
+\def\markdownRendererDlItemPrototype#1{%
+ \startMarkdownConTeXtDlItemPrototype{#1}}%
+\def\markdownRendererDlItemEndPrototype{%
+ \stopMarkdownConTeXtDlItemPrototype}%
\def\markdownRendererDlEndPrototype{%
\stopMarkdownConTeXtDlPrototype}%
\def\markdownRendererDlEndTightPrototype{%
\stopMarkdownConTeXtDlTightPrototype}%
-\long\def\markdownRendererEmphasisPrototype#1{{\em#1}}%
-\long\def\markdownRendererStrongEmphasisPrototype#1{{\bf\em#1}}%
+\def\markdownRendererEmphasisPrototype#1{{\em#1}}%
+\def\markdownRendererStrongEmphasisPrototype#1{{\bf\em#1}}%
\def\markdownRendererBlockQuoteBeginPrototype{\startquotation}%
\def\markdownRendererBlockQuoteEndPrototype{\stopquotation}%
-\long\def\markdownRendererInputVerbatimPrototype#1{\typefile{#1}}%
-\long\def\markdownRendererHeadingOnePrototype#1{\chapter{#1}}%
-\long\def\markdownRendererHeadingTwoPrototype#1{\section{#1}}%
-\long\def\markdownRendererHeadingThreePrototype#1{\subsection{#1}}%
-\long\def\markdownRendererHeadingFourPrototype#1{\subsubsection{#1}}%
-\long\def\markdownRendererHeadingFivePrototype#1{\subsubsubsection{#1}}%
-\long\def\markdownRendererHeadingSixPrototype#1{\subsubsubsubsection{#1}}%
+\def\markdownRendererInputVerbatimPrototype#1{\typefile{#1}}%
+\def\markdownRendererInputFencedCodePrototype#1#2{%
+ \ifx\relax#2\relax
+ \typefile{#1}%
+ \else
+ \typefile[#2][]{#1}%
+ \fi}%
+\def\markdownRendererHeadingOnePrototype#1{\chapter{#1}}%
+\def\markdownRendererHeadingTwoPrototype#1{\section{#1}}%
+\def\markdownRendererHeadingThreePrototype#1{\subsection{#1}}%
+\def\markdownRendererHeadingFourPrototype#1{\subsubsection{#1}}%
+\def\markdownRendererHeadingFivePrototype#1{\subsubsubsection{#1}}%
+\def\markdownRendererHeadingSixPrototype#1{\subsubsubsubsection{#1}}%
\def\markdownRendererHorizontalRulePrototype{%
\blackrule[height=1pt, width=\hsize]}%
-\long\def\markdownRendererFootnotePrototype#1{\footnote{#1}}%
+\def\markdownRendererFootnotePrototype#1{\footnote{#1}}%
\stopmodule\protect
\endinput
%%