From ddf2524477e2a59b36fd37f7e5957ebb3b37c265 Mon Sep 17 00:00:00 2001 From: schrieveslaach Date: Sat, 6 May 2017 15:09:29 +0200 Subject: Fix keyval funtion: pandoc did not parse options in braces correctly.… (#3642) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix keyval funtion: pandoc did not parse options in braces correctly. Additionally, dot, dash, and colon were no valid characters * Add | as possible option value * Improved code --- test/command/lstlisting.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/command/lstlisting.md (limited to 'test') diff --git a/test/command/lstlisting.md b/test/command/lstlisting.md new file mode 100644 index 000000000..d928cc702 --- /dev/null +++ b/test/command/lstlisting.md @@ -0,0 +1,25 @@ +``` +% pandoc -f latex -t native +\begin{lstlisting}[language=Java, caption={Java Example}, label=lst:Hello-World] +public class World { + public static void main(String[] args) { + System.out.println("Hello World"); + } +} +\end{lstlisting} +^D +[CodeBlock ("lst:Hello-World",["java"],[("language","Java"),("caption","Java Example"),("label","lst:Hello-World")]) "public class World {\n public static void main(String[] args) {\n System.out.println(\"Hello World\");\n }\n}"] +``` + +``` +% pandoc -f latex -t native +\begin{lstlisting}[language=Java, escapechar=|, caption={Java Example}, label=lst:Hello-World] +public class World { + public static void main(String[] args) { + System.out.println("Hello World"); + } +} +\end{lstlisting} +^D +[CodeBlock ("lst:Hello-World",["java"],[("language","Java"),("escapechar","|"),("caption","Java Example"),("label","lst:Hello-World")]) "public class World {\n public static void main(String[] args) {\n System.out.println(\"Hello World\");\n }\n}"] +``` -- cgit v1.2.3