Lines Matching +refs:text +refs:line +refs:d
26 const line = this.findMatch(node);
28 node.matchline = line;
30 if (line !== null)
31 this.outer.matches.add (node.type, node.handle, line, line, 'header');
66 for (let line of lines) {
69 const header = this.isHeader(line);
76 text : header.text, property
89 var d = 1;
95 var leftNodeNeighbor = this.getNeighbor(this.nodes, idx_node-d);
96 var leftTextNeighbor = this.getNeighbor(this.candidates, idx_text-d);
100 var rightNodeNeighbor = this.getNeighbor(this.nodes, idx_node+d);
101 var rightTextNeighbor = this.getNeighbor(this.candidates, idx_text+d);
108 d += 1;
110 return score/(2*d);
120 if (node.text != candidate.text)
131 isHeader (line) { argument
134 if (line.search("==") == -1)
137 if (line.substr(0,2) == ' ')
140 if (line.trim().slice(-2) != '==')
143 let regex = /(={2,})/gd;
144 let matches = [...line.matchAll(regex)];
153 var content = line.substring(pos_start, pos_end);
154 var text = content.trim();
156 if (text.length == 0)
168 text : text,