MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / isstate

Method isstate

markdown/blockparser.py:30–35  ·  view source on GitHub ↗

Test that top (current) level is of given state.

(self, state)

Source from the content-addressed store, hash-verified

28 self.pop()
29
30 def isstate(self, state):
31 """ Test that top (current) level is of given state. """
32 if len(self):
33 return self[-1] == state
34 else:
35 return False
36
37class BlockParser:
38 """ Parse Markdown blocks into an ElementTree object.

Callers 3

testMethod · 0.80
get_levelMethod · 0.80
runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected