MCPcopy
hub / github.com/ampproject/amphtml / getInnerText

Function getInnerText

build-system/status-page/common.js:34–39  ·  view source on GitHub ↗

* Gets text between two headers * @param {string }body * @param {string} header * @return {string}

(body, header)

Source from the content-addressed store, hash-verified

32 * @return {string}
33 */
34function getInnerText(body, header) {
35 const markdownHeader = `### ${header}`;
36 const start = body.indexOf(markdownHeader);
37 const end = body.indexOf('###', start + markdownHeader.length);
38 return body.substring(start + markdownHeader.length, end).trim();
39}
40
41/**
42 * Get channels from Channels section

Callers 2

getChannelsFunction · 0.85
getFormatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected