workaround for code block being parsed before quote block.

This commit is contained in:
kerryliu
2015-08-31 10:01:36 -07:00
parent da25abfcc9
commit cb9c603b6b
3 changed files with 14 additions and 0 deletions
@@ -33,6 +33,7 @@ function codeFlattenBlocks(blocks) {
Discourse.Dialect.replaceBlock({
start: /^`{3}([^\n\[\]]+)?\n?([\s\S]*)?/gm,
stop: /^```$/gm,
withoutLeading: /\[quote/gm, //if leading text contains a quote this should not match
emitter: function(blockContents, matches) {
var klass = Discourse.SiteSettings.default_code_lang;