MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / _line_number_from_offset

Function _line_number_from_offset

scripts/lint_note.py:1029–1030  ·  view source on GitHub ↗
(text: str, offset: int)

Source from the content-addressed store, hash-verified

1027
1028
1029def _line_number_from_offset(text: str, offset: int) -> int:
1030 return text.count("\n", 0, offset) + 1
1031
1032
1033def _formula_snippet(content: str, limit: int = 120) -> str:

Callers 2

_extract_math_blocksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected