Skip to content

Commit

Permalink
Simplify info string strip
Browse files Browse the repository at this point in the history
token.info is always a `str` so we can do this
  • Loading branch information
hukkinj1 authored May 2, 2021
1 parent fb8c8fd commit 6678b2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion myst_parser/docutils_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def render_code_block(self, token: SyntaxTreeNode) -> None:
def render_fence(self, token: SyntaxTreeNode) -> None:
text = token.content
# Ensure that we'll have an empty string if info exists but is only spaces
info = token.info.strip() if token.info else token.info
info = token.info.strip()
language = info.split()[0] if info else ""

if not self.config.get("commonmark_only", False) and language == "{eval-rst}":
Expand Down

0 comments on commit 6678b2d

Please sign in to comment.