Skip to content

Commit

Permalink
Escape preexisting asterisks in tldr-pages
Browse files Browse the repository at this point in the history
Fixes incorrect styling in pages that contain asterisk characters
  • Loading branch information
superatomic committed Aug 7, 2022
1 parent f586862 commit c9a440b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tldr_man/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def render_manpage(tldr_page: str) -> Optional[str]:
if not line:
continue

indicator, contents = line[0], line[1:].strip().replace(r'\\', r'\e')
indicator, contents = line[0], line[1:].strip().replace(r'\\', r'\e').replace('*', r'\*')
match indicator:
case '-':
examples.append(f'\n**{contents}**\n')
Expand Down

0 comments on commit c9a440b

Please sign in to comment.