MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / at_line_start

Method at_line_start

markdown/htmlparser.py:194–205  ·  view source on GitHub ↗

Returns True if current position is at start of line. Allows for up to three blank spaces at start of line.

(self)

Source from the content-addressed store, hash-verified

192 return self.lineno_start_cache[self.lineno-1]
193
194 def at_line_start(self) -> bool:
195 """
196 Returns True if current position is at start of line.
197
198 Allows for up to three blank spaces at start of line.
199 """
200 if self.offset == 0:
201 return True
202 if self.offset > 3:
203 return False
204 # Confirm up to first 3 chars are whitespace
205 return self.rawdata[self.line_offset:self.line_offset + self.offset].strip() == ''
206
207 def get_endtag_text(self, tag: str) -> str:
208 """

Callers 8

handle_starttagMethod · 0.95
handle_empty_tagMethod · 0.95
parse_piMethod · 0.95
handle_starttagMethod · 0.80
handle_empty_tagMethod · 0.80
parse_piMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected