mirror of
https://github.com/chubin/cheat.sh.git
synced 2026-06-20 13:16:44 +02:00
Merge branch 'master' of https://github.com/chubin/cheat.sh
This commit is contained in:
@@ -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 = '<pre style="position:absolute;padding-left:40em;overflow:visible;height:0;">[<a href="%s" style="color:cyan">edit</a>]</pre>' % edit_page_link
|
||||
result = re.sub("<pre>", edit_button + form_html + "<pre>", result)
|
||||
|
||||
Reference in New Issue
Block a user