Moved Org Mode support to dedicated repository and project.
[sixth.git] / src / main / java / eu / svjatoslav / sixth / core / document / content / MultilineCode.java
diff --git a/src/main/java/eu/svjatoslav/sixth/core/document/content/MultilineCode.java b/src/main/java/eu/svjatoslav/sixth/core/document/content/MultilineCode.java
deleted file mode 100644 (file)
index 212d412..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package eu.svjatoslav.sixth.core.document.content;
-
-import eu.svjatoslav.commons.string.String2;
-import eu.svjatoslav.commons.string.tokenizer.Tokenizer;
-
-import static eu.svjatoslav.commons.string.tokenizer.Terminator.TerminationStrategy.DROP;
-
-public class MultilineCode implements Content {
-    public final String language;
-    public final String code;
-
-    public MultilineCode(String languageAndParams, String code) {
-
-        final Tokenizer tokenizer = new Tokenizer(languageAndParams);
-        tokenizer.addTerminator(DROP, "[ \\t]+", "whitespace");
-        if (tokenizer.hasMoreContent()){
-            language = tokenizer.getNextToken().token;
-        } else {
-            language = null;
-        }
-
-        this.code = code;
-    }
-
-    @Override
-    public void toMD(StringBuilder sb, int indent) {
-        String2 s = new String2();
-        s.append(" ", indent).append("```" + getMDlanguage() + "\n");
-        // TODO: ensure that required indent is present
-        s.append(code + "\n");
-        s.append(" ", indent).append("```\n");
-        sb.append(s.toString());
-    }
-
-    public String getMDlanguage(){
-        if (language == null) return "";
-        return language;
-    }
-}