FIX: allows graph definition to have blank lines

FIX: allows graph definition to have blank lines

diff --git a/assets/javascripts/discourse-markdown/discourse-graphviz.js.es6 b/assets/javascripts/discourse-markdown/discourse-graphviz.js.es6
index d9e0db5..f4e2f20 100644
--- a/assets/javascripts/discourse-markdown/discourse-graphviz.js.es6
+++ b/assets/javascripts/discourse-markdown/discourse-graphviz.js.es6
@@ -11,10 +11,10 @@ export function setup(helper) {
 
   helper.registerPlugin(md => {
     if (md.options.discourse.features.graphviz) {
-      md.inline.bbcode.ruler.push("graphviz", {
+      md.block.bbcode.ruler.push("graphviz", {
         tag: "graphviz",
 
-        replace: function(state, tagInfo, content) {
+        replace(state, tagInfo, content) {
           const engines = ["dot", "neato", "circo", "fdp", "osage", "twopi"];
           const token = state.push("html_raw", "", 0);

GitHub sha: 1895d467

1 Like