Skip to content

Commit

Permalink
Navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
shaedrich authored Jun 6, 2024
1 parent 7e97580 commit 89cf63d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/superfences_ponylang/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,14 @@ def format(source, language, css_class, options, md, classes=None, id_value='',
except:
raise SuperFencesException('Could not highlight source code "%s" passed' % (source))

return '<code lang="pony">%s</code>' % highlighted
return """
<nav class="md-code__nav">
<button class="md-code__button" title="Copy to clipboard" data-clipboard-target="#__code_1 &gt; code" data-md-type="copy"></button>
<button class="md-code__button" title="Run in playground" data-md-type="run"></button>
<button class="md-code__button" title="Run in playground" data-md-type="inline"></button>
</nav>
<code lang="pony">%s</code>
""" % highlighted

return """
<pre class_name="ponylang %s %s", data-option="%s">
Expand Down

0 comments on commit 89cf63d

Please sign in to comment.