MCPcopy
hub / github.com/teadocs/numpy-cn / replaceAForTable

Method replaceAForTable

scripts/htmlToMd.js:236–250  ·  view source on GitHub ↗
(content, $el)

Source from the content-addressed store, hash-verified

234 }
235
236 replaceAForTable(content, $el) {
237 let that = this;
238 let as = $el.find('a');
239 if (as.length) {
240 as.each(function (index, el) {
241 let href = that.$(el).attr('href');
242 let text = that.$(el).text();
243 if (href.substring(0, 2) === '..') {
244 href = that.baseUrl + href.substring(2, href.length);
245 }
246 content = content.replace(text, `[${text}](${href})`);
247 });
248 }
249 return content;
250 }
251
252 replaceSpan($el) {
253 let that = this;

Callers 1

parseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected