Upload files to "java/markup"

This commit is contained in:
2026-04-13 10:48:08 +03:00
parent d5c3e10e29
commit 95c17f7dd2
5 changed files with 67 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
package markup;
/**
* @author Nikita Doschennikov (me@fymio.us)
*/
public interface PrimePart extends Markup {}

View File

@@ -0,0 +1,13 @@
package markup;
import java.util.List;
/**
* @author Nikita Doschennikov (me@fymio.us)
*/
public class Strikeout extends AbstractMarkup implements PartOfParagraph {
public Strikeout(List<PartOfParagraph> items) {
super(items, "~", "s", "\\textst{", "}");
}
}

13
java/markup/Strong.java Normal file
View File

@@ -0,0 +1,13 @@
package markup;
import java.util.List;
/**
* @author Nikita Doschennikov (me@fymio.us)
*/
public class Strong extends AbstractMarkup implements PartOfParagraph {
public Strong(List<PartOfParagraph> items) {
super(items, "__", "strong", "\\textbf{", "}");
}
}

8
java/markup/Tex.java Normal file
View File

@@ -0,0 +1,8 @@
package markup;
/**
* @author Nikita Doschennikov (me@fymio.us)
*/
public interface Tex {
void toTex(StringBuilder sb);
}

27
java/markup/Text.java Normal file
View File

@@ -0,0 +1,27 @@
package markup;
/**
* @author Nikita Doschennikov (me@fymio.us)
*/
public class Text implements PartOfParagraph {
private final String text;
public Text(String text) {
this.text = text;
}
@Override
public void toHtml(StringBuilder sb) {
sb.append(text);
}
@Override
public void toMarkdown(StringBuilder sb) {
sb.append(text);
}
public void toTex(StringBuilder sb) {
sb.append(text);
}
}