MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / code_spans

Function code_spans

scripts/website/find_suspicious_inline_code.py:33–45  ·  view source on GitHub ↗
(line: str)

Source from the content-addressed store, hash-verified

31
32
33def code_spans(line: str) -> list[tuple[int, int]]:
34 spans: list[tuple[int, int]] = []
35 i = 0
36 while i < len(line):
37 s = line.find("`", i)
38 if s < 0:
39 break
40 e = line.find("`", s + 1)
41 if e < 0:
42 break
43 spans.append((s, e + 1))
44 i = e + 1
45 return spans
46
47
48def in_spans(pos: int, spans: list[tuple[int, int]]) -> bool:

Callers 1

scan_fileFunction · 0.85

Calls 2

findMethod · 0.65
appendMethod · 0.65

Tested by

no test coverage detected