summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wikimini/document.py11
-rw-r--r--wikimini/templates/quotes.py6
2 files changed, 13 insertions, 4 deletions
diff --git a/wikimini/document.py b/wikimini/document.py
index be51108..fe979fc 100644
--- a/wikimini/document.py
+++ b/wikimini/document.py
@@ -194,6 +194,15 @@ class Block:
@dataclass
+class LineBreak:
+ """Represents an enforced empty line."""
+ __slots__ = ()
+
+ def plain(self):
+ return "\n"
+
+
+@dataclass
class Paragraph(Block):
"""A paragraph is a piece of text, which itself can hold inline markup."""
__slots__ = ("nodes",)
@@ -315,7 +324,7 @@ class ItemList(Block):
@dataclass
-class Blockquote(Block):
+class BlockQuote(Block):
"""A quote.
Attributes:
diff --git a/wikimini/templates/quotes.py b/wikimini/templates/quotes.py
index fdf00cc..ef7f297 100644
--- a/wikimini/templates/quotes.py
+++ b/wikimini/templates/quotes.py
@@ -1,7 +1,7 @@
"""Renders various quote related templates."""
from . import registry
-from ..document import Blockquote
+from ..document import BlockQuote
def tmpl_quote(wikimini, obj):
@@ -10,7 +10,7 @@ def tmpl_quote(wikimini, obj):
if not text:
return ""
content = wikimini.convert(text.value).nodes()
- return [Blockquote(content)]
+ return [BlockQuote(content)]
registry.insert("blockquote", tmpl_quote)
@@ -21,7 +21,7 @@ def tmpl_cquote(wikimini, obj):
"""Renders the ``{{cquote|...}}`` template."""
text = obj.params[0]
content = wikimini.convert(text.value).nodes()
- return [Blockquote(content)]
+ return [BlockQuote(content)]
registry.insert("cquote", tmpl_cquote)