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

Method at_line_start

markdown/htmlparser.py:181–192  ·  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

179 return self.lineno_start_cache[self.lineno-1]
180
181 def at_line_start(self) -> bool:
182 """
183 Returns True if current position is at start of line.
184
185 Allows for up to three blank spaces at start of line.
186 """
187 if self.offset == 0:
188 return True
189 if self.offset > 3:
190 return False
191 # Confirm up to first 3 chars are whitespace
192 return self.rawdata[self.line_offset:self.line_offset + self.offset].strip() == ''
193
194 def get_endtag_text(self, tag: str) -> str:
195 """

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