From 4487d6a4c25ba5d3a366e2a8ada489a6a08d67ab Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 17 Sep 2014 12:17:32 -0400 Subject: [PATCH] Revert "FEATURE: fenced code blocks can hint with "pre" or "text"" This reverts commit 943ad8d1d54cc39f297198c338d484d98a4e7536. --- .../javascripts/discourse/dialects/code_dialect.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/assets/javascripts/discourse/dialects/code_dialect.js b/app/assets/javascripts/discourse/dialects/code_dialect.js index 8ef0545296b..275b138fe65 100644 --- a/app/assets/javascripts/discourse/dialects/code_dialect.js +++ b/app/assets/javascripts/discourse/dialects/code_dialect.js @@ -10,8 +10,6 @@ var acceptableCodeClasses = "profile", "python", "r", "rib", "rsl", "ruby", "rust", "scala", "smalltalk", "sql", "tex", "text", "vala", "vbscript", "vhdl"]; -var textCodeClasses = ["text", "pre"]; - function flattenBlocks(blocks) { var result = ""; blocks.forEach(function(b) { @@ -30,12 +28,7 @@ Discourse.Dialect.replaceBlock({ if (matches[1] && acceptableCodeClasses.indexOf(matches[1]) !== -1) { klass = matches[1]; } - - if (textCodeClasses.indexOf(matches[1]) !== -1) { - return ['p', ['pre', ['code', flattenBlocks(blockContents) ]]]; - } else { - return ['p', ['pre', ['code', {'class': klass}, flattenBlocks(blockContents) ]]]; - } + return ['p', ['pre', ['code', {'class': klass}, flattenBlocks(blockContents) ]]]; } });