MCPcopy Create free account
hub / github.com/executablebooks/markdown-it-py / attrPush

Method attrPush

markdown_it/token.py:93–96  ·  view source on GitHub ↗

Add `[ name, value ]` attribute to list. Init attrs if necessary.

(self, attrData: tuple[str, str | int | float])

Source from the content-addressed store, hash-verified

91 return list(self.attrs.items())
92
93 def attrPush(self, attrData: tuple[str, str | int | float]) -> None:
94 """Add `[ name, value ]` attribute to list. Init attrs if necessary."""
95 name, value = attrData
96 self.attrSet(name, value)
97
98 def attrSet(self, name: str, value: str | int | float) -> None:
99 """Set `name` attribute to `value`. Override old value if exists."""

Callers 1

test_tokenFunction · 0.95

Calls 1

attrSetMethod · 0.95

Tested by 1

test_tokenFunction · 0.76