MCPcopy Index your code
hub / github.com/csev/py4e / lineInfo

Function lineInfo

tools/pythonauto/static/codemirrorepl/codemirrorepl.js:1728–1742  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

1726 }
1727
1728 function lineInfo(line) {
1729 if (typeof line == "number") {
1730 if (!isLine(line)) return null;
1731 var n = line;
1732 line = getLine(line);
1733 if (!line) return null;
1734 }
1735 else {
1736 var n = lineNo(line);
1737 if (n == null) return null;
1738 }
1739 var marker = line.gutterMarker;
1740 return {line: n, handle: line, text: line.text, markerText: marker && marker.text,
1741 markerClass: marker && marker.style, lineClass: line.className, bgClass: line.bgClassName};
1742 }
1743
1744 function stringWidth(str) {
1745 measure.innerHTML = "<pre><span>x</span></pre>";

Callers

nothing calls this directly

Calls 3

isLineFunction · 0.70
getLineFunction · 0.70
lineNoFunction · 0.70

Tested by

no test coverage detected