Skip to content

Commit

Permalink
fix: restore mixedCase attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Jun 23, 2024
1 parent e4b0b2a commit 2886e00
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions mdformat_admon/factories/_whitespace_admon_factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ def validate_admon_meta(meta_text: str) -> bool:


class AdmonState(NamedTuple):
"""Frozen state."""
"""Frozen state using the same variable case."""

parent_type: str
line_max: int
blk_indent: int
parentType: str # noqa: N815
lineMax: int # noqa: N815
blkIndent: int # noqa: N815


class AdmonitionData(NamedTuple):
Expand Down Expand Up @@ -148,9 +148,9 @@ def parse_possible_whitespace_admon(
return True

old_state = AdmonState(
parent_type=state.parentType,
line_max=state.lineMax,
blk_indent=state.blkIndent,
parentType=state.parentType,
lineMax=state.lineMax,
blkIndent=state.blkIndent,
)
state.parentType = "admonition"

Expand Down
6 changes: 3 additions & 3 deletions mdformat_admon/mdit_plugins/_python_markdown_admon.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def format_python_markdown_admon_markup(

state.md.block.tokenize(state, start_line + 1, admonition.next_line)

state.parentType = admonition.old_state.parent_type
state.lineMax = admonition.old_state.line_max
state.blkIndent = admonition.old_state.blk_indent
state.parentType = admonition.old_state.parentType
state.lineMax = admonition.old_state.lineMax
state.blkIndent = admonition.old_state.blkIndent
state.line = admonition.next_line


Expand Down

0 comments on commit 2886e00

Please sign in to comment.