MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / rejectHtmlComments

Function rejectHtmlComments

ses.cjs:5759–5769  ·  view source on GitHub ↗
(src)

Source from the content-addressed store, hash-verified

5757 * @returns {string}
5758 */
5759const rejectHtmlComments= (src)=>{
5760 const lineNumber= getLineNumber(src, htmlCommentPattern);
5761 if( lineNumber< 0) {
5762 return src;
5763 }
5764 const name= getSourceURL(src);
5765 // See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_HTML_COMMENT_REJECTED.md
5766 throw SyntaxError(
5767 `Possible HTML comment rejected at ${name}:${lineNumber}. (SES_HTML_COMMENT_REJECTED)`);
5768
5769 };
5770
5771/**
5772 * An optional transform to place ahead of `rejectHtmlComments` to evade *that*

Callers 1

mandatoryTransformsFunction · 0.85

Calls 2

getLineNumberFunction · 0.85
getSourceURLFunction · 0.85

Tested by

no test coverage detected