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:
29
java/markup/Paragraph.java
Normal file
29
java/markup/Paragraph.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package markup;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Paragraph extends AbstractMarkup implements ListItemContent {
|
||||
public Paragraph(List<MarkupElement> elements) {
|
||||
super(elements);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toMarkdown(StringBuilder sb) {
|
||||
for (MarkupElement element : elements) {
|
||||
element.toMarkdown(sb);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toHtml(StringBuilder sb) {
|
||||
toHtml(sb, "p");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toTex(StringBuilder sb) {
|
||||
sb.append("\\par{}");
|
||||
for (MarkupElement element : elements) {
|
||||
element.toTex(sb);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user