Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
shaedrich committed Jun 5, 2024
1 parent ad23762 commit c5ce12a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/superfences_ponylang/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pygments.formatters import HtmlFormatter

def format(source, language, css_class, options, md, classes=None, id_value='', attrs=None, **kwargs):
print(highlight(source, PythonLexer(), HtmlFormatter()))
return """
<pre class_name="ponylang %s %s", data-option="%s">
<nav class="md-code__nav">
Expand All @@ -18,5 +19,7 @@ def validate(language: str, options: dict) -> bool:
allowed_options = { "snippet", "dedent_subsections" } #lambda v: v in ENGINES
for opt in options.keys():
if opt not in allowed_options:
print('invalid fence')
return False
print('valid fence')
return True

0 comments on commit c5ce12a

Please sign in to comment.