From 2ee4e703eb4765be60e3783b6106b8f5fad70bcc Mon Sep 17 00:00:00 2001
From: Mac Siri
Date: Tue, 3 Dec 2019 13:04:53 -0500
Subject: [PATCH] Remove disable_indented_code_blocks (#4988) [deploy]
We have decided enable indented-code-block because it is an expected
markdown feature. The trade-off here is that backticks will cause
rendering issues in codeblock.
---
config/initializers/redcarpet.rb | 1 -
.../approvals/user_preview_article_body.approved.html | 6 ++++++
spec/support/fixtures/sample_article_template_spec.txt | 5 +++++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/config/initializers/redcarpet.rb b/config/initializers/redcarpet.rb
index e12c2a853..51660959e 100644
--- a/config/initializers/redcarpet.rb
+++ b/config/initializers/redcarpet.rb
@@ -2,7 +2,6 @@
autolink: true,
no_intra_emphasis: true,
fenced_code_blocks: true,
- disable_indented_code_blocks: true,
lax_html_blocks: true,
lax_spacing: true,
strikethrough: true,
diff --git a/spec/support/fixtures/approvals/user_preview_article_body.approved.html b/spec/support/fixtures/approvals/user_preview_article_body.approved.html
index 2167afe02..998b0771d 100644
--- a/spec/support/fixtures/approvals/user_preview_article_body.approved.html
+++ b/spec/support/fixtures/approvals/user_preview_article_body.approved.html
@@ -107,6 +107,12 @@ the present is our past.
+// indented codeblock should work
+function hello() {
+ console.log("hello");
+}
+
+
- [x] @mentions, #refs, links, formatting, and
tags supported
- [x] list syntax required (any unordered or ordered list supported)
- [x] this is a complete item
diff --git a/spec/support/fixtures/sample_article_template_spec.txt b/spec/support/fixtures/sample_article_template_spec.txt
index b5eb73610..acd5105c5 100644
--- a/spec/support/fixtures/sample_article_template_spec.txt
+++ b/spec/support/fixtures/sample_article_template_spec.txt
@@ -61,6 +61,11 @@ function fancyAlert(arg) {
}
```
+ // indented codeblock should work
+ function hello() {
+ console.log("hello");
+ }
+
- [x] @mentions, #refs, [links](), **formatting**, and tags supported
- [x] list syntax required (any unordered or ordered list supported)