diff --git a/lib/cheat_wrapper.py b/lib/cheat_wrapper.py index 5652c52..8b9545b 100644 --- a/lib/cheat_wrapper.py +++ b/lib/cheat_wrapper.py @@ -585,6 +585,9 @@ def cheat_wrapper(query, request_options=None, html=False): edit_button = '' if editable: + # It's possible that topic directory starts with omited underscore + if '/' in topic: + topic = '_' + topic edit_page_link = 'https://github.com/chubin/cheat.sheets/edit/master/sheets/' + topic edit_button = '
[edit]' % edit_page_link result = re.sub("
", edit_button + form_html + "", result)