From 1cf0bba9e0cdbf0a473b261d055210da46fb114c Mon Sep 17 00:00:00 2001 From: benweet Date: Wed, 21 May 2014 23:55:51 +0100 Subject: [PATCH] Added monospaced syntax highlighting for tables --- public/res/libs/prism-markdown.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/res/libs/prism-markdown.js b/public/res/libs/prism-markdown.js index 98f20673..c0465945 100644 --- a/public/res/libs/prism-markdown.js +++ b/public/res/libs/prism-markdown.js @@ -7,19 +7,19 @@ Prism.languages.md = (function() { var latex = Prism.languages.latex; var md = {}; + md['pre gfm'] = { + pattern: /^`{3}.*\n(?:[\s\S]*?)\n`{3} *$/gm, + inside: { + "md md-pre": /`{3}/, + lf: /\n/gm + } + }; md.pre = { pattern: /(^|(?:^|(?:^|\n)(?![ \t]*([*+\-]|\d+\.)[ \t]).*\n)\s*?\n)(\s*(?: {4}|\t).*(?:\n|$))+/g, lookbehind: true, inside: { } }; - md['pre gfm'] = { - pattern: /^ {0,3}`{3}.*?\n(.*?\n)*? {0,3}`{3} *$/gm, - inside: { - "md md-pre": /`{3}/, - lf: /\n/gm, - } - }; md['h1 alt'] = { pattern: /^(.+)[ \t]*\n=+[ \t]*$/gm, inside: {