Skip to content

Commit

Permalink
fix(xwiki-renderer): honor escape sequences
Browse files Browse the repository at this point in the history
For example, markdown '\*' -> xwiki '~*'.
  • Loading branch information
pbodnar committed Sep 16, 2021
1 parent 7087afb commit a79b04b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contrib/xwiki20_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def render_auto_link(self, token):
return template.format(target=target)

def render_escape_sequence(self, token):
return self.render_inner(token)
return '~' + self.render_inner(token)

def render_raw_text(self, token, escape=True):
return (token.content.replace('~', '~~')
Expand Down
2 changes: 1 addition & 1 deletion test/samples/basic_blocks.xwiki20
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Line.
Another Line because the previous ends with at least two spaces.

Line.
Another line because the previous ends with a "\".
Another line because the previous ends with a "~\".

== Other block elements ==

Expand Down

0 comments on commit a79b04b

Please sign in to comment.