Skip to content

Commit a9051e1

Browse files
committed
fix: function rendering with Replaceable
1 parent 1ab7d0b commit a9051e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pyconverter/xml2py/ast_tree.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,10 @@ def content_equals(self):
10421042

10431043
def to_rst(self, indent="", max_length=100):
10441044
"""Return a string to enable converting the element to an RST format."""
1045-
rst_replaceable = f"``{self.content[0]}`` {self.tail}"
1045+
tail = self.tail
1046+
if tail and "*" in tail:
1047+
tail = self.tail.replace("*", "\*")
1048+
rst_replaceable = f"``{self.content[0]}`` {tail}"
10461049
if isinstance(self.prev_elem, Command):
10471050
if any([self.content[0] in arg for arg in self.prev_elem.args]):
10481051
rst_replaceable = f"{self.tail}"

0 commit comments

Comments
 (0)