module("MDTest", { setup: function() { Discourse.SiteSettings.traditional_markdown_linebreaks = false; } }); // This is cheating, but the trivial differences between sanitization // do not affect formatting. function normalize(str) { return str.replace(/\n\s*/g, ''). replace(/ \/\>/g, '>'). replace(/ ?/g, "\t"). replace(/"/g, '"'); } // We use a custom sanitizer for MD test that hoists out comments. In Discourse // they are stripped, but to be compliant with the spec they should not be. function hoistingSanitizer(result) { var hoisted, m = result.match(//g); if (m && m.length) { hoisted = []; for (var i=0; i <%= mdtest_suite %>