add solutions for hw7 (markup) and tests
Some checks failed
Fast Reverse Tests / test (push) Failing after 17s
Markup Tests / test (push) Failing after 13s
Reverse Tests / test (push) Failing after 13s
Sum Tests / test (push) Failing after 13s
Word Stat Tests / test (push) Failing after 13s
Word Stat++ Tests / test (push) Failing after 13s
Some checks failed
Fast Reverse Tests / test (push) Failing after 17s
Markup Tests / test (push) Failing after 13s
Reverse Tests / test (push) Failing after 13s
Sum Tests / test (push) Failing after 13s
Word Stat Tests / test (push) Failing after 13s
Word Stat++ Tests / test (push) Failing after 13s
This commit is contained in:
24
java/markup/Text.java
Normal file
24
java/markup/Text.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package markup;
|
||||
|
||||
public class Text implements MarkupElement {
|
||||
private final String text;
|
||||
|
||||
public Text(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toMarkdown(StringBuilder sb) {
|
||||
sb.append(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toHtml(StringBuilder sb) {
|
||||
sb.append(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toTex(StringBuilder sb) {
|
||||
sb.append(text);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user