Added support for: Verse, Multiline code block, drawer property. Fixes.
[sixth.git] / src / main / java / eu / svjatoslav / sixth / core / document / content / Verse.java
diff --git a/src/main/java/eu/svjatoslav/sixth/core/document/content/Verse.java b/src/main/java/eu/svjatoslav/sixth/core/document/content/Verse.java
new file mode 100644 (file)
index 0000000..9c62af7
--- /dev/null
@@ -0,0 +1,21 @@
+package eu.svjatoslav.sixth.core.document.content;
+
+import eu.svjatoslav.commons.string.String2;
+
+public class Verse implements Content {
+    public final String verse;
+
+    public Verse(String verse) {
+        this.verse = verse;
+    }
+
+    @Override
+    public void toMD(StringBuilder sb, int indent) {
+        String2 s = new String2();
+        s.append(" ", indent).append("```\n");
+        // TODO: ensure that required indent is present
+        s.append(verse + "\n");
+        s.append(" ", indent).append("```\n");
+        sb.append(s.toString());
+    }
+}