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

Method replaceCode

scripts/htmlToMd.js:204–216  ·  view source on GitHub ↗
($el)

Source from the content-addressed store, hash-verified

202 }
203
204 replaceCode($el) {
205 let that = this;
206 let hContent = $el.prop("outerHTML");
207 let codes = $el.find('code');
208 if (codes.length) {
209 codes.each(function (index, el) {
210 let outHtml = that.$(el).prop("outerHTML");
211 let text = that.$(el).text();
212 hContent = hContent.replace(outHtml, `\`\`${text}\`\``);
213 });
214 }
215 return hContent;
216 }
217
218 replaceA($el) {
219 let that = this;

Callers 2

getHtextMethod · 0.95
getPcontentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected