Benjamin-eecs's picture
release v1: 65 held-out tasks, 78 bootstrap records, r2e_local adapter, manifest ae94c40b (part 3)
98fe40b verified
Raw History Blame Contribute Delete
1.02 kB
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a39481c..a338c44 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## Unreleased
+
+- Fix a rendering bug when line breaks exist in a link text. [#126](https://github.com/frostming/marko/issue/126)
+
## v1.2.2(2022-09-22)
- Fix a bug of markdown renderer, the ordered list index isn't increasing. [#112](https://github.com/frostming/marko/pull/112)
diff --git a/marko/inline.py b/marko/inline.py
index f497132..a1fc175 100644
--- a/marko/inline.py
+++ b/marko/inline.py
@@ -80,6 +80,7 @@ class LineBreak(InlineElement):
def __init__(self, match: "_Match") -> None:
self.soft = not match.group(1).startswith((" ", "\\"))
+ self.children = "\n"
class InlineHTML(InlineElement):
@@ -190,9 +191,6 @@ class RawText(InlineElement):
virtual = True
- if TYPE_CHECKING:
- children: str
-
def __init__(self, match: str, escape: bool = True) -> None:
self.children = match
self.escape = escape