mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
fix(docs): limit_markdown_headings fails
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ class HeadingsRenderer(MarkdownRenderer):
|
||||
self.initial_level = float("inf")
|
||||
|
||||
def heading(self, token: Dict[str, Any], state: Any):
|
||||
if self.initial_level is float("inf"):
|
||||
if self.initial_level == float("inf"):
|
||||
self.initial_level = token["attrs"]["level"]
|
||||
token["attrs"]["level"] += self.min_level - max(1, self.initial_level)
|
||||
return super().heading(token, state)
|
||||
|
||||
Reference in New Issue
Block a user