Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs(xml): code escaping for XMLDocs generation (#5703)
Anže Vodovnikad27f3bf02b5
diff --git a/utils/doclint/xmlDocumentation.js b/utils/doclint/xmlDocumentation.jsindex 37c1858fe0..2874793dcf 100644--- a/utils/doclint/xmlDocumentation.js+++ b/utils/doclint/xmlDocumentation.js@@ -60,7 +60,7 @@ function _innerRenderNodes(nodes, maxColumns = 80, wrapParagraphs = true) {elsesummary.push(..._wrapAndEscape(node, maxColumns));} else if (node.type === 'code' && node.codeLang === 'csharp') {- _wrapInNode('code', node.lines, summary);+ _wrapInNode('code', _wrapCode(node.lines), summary);} else if (node.type === 'li') {_wrapInNode('item><description', _wrapAndEscape(node, maxColumns), summary, '/description></item');} else if (node.type === 'note') {@@ -73,6 +73,19 @@ function _innerRenderNodes(nodes, maxColumns = 80, wrapParagraphs = true) {return { summary, remarks };}+function _wrapCode(lines) {+ let i = 0;+ let out = [];+ for (let line of lines) {+ line = line.replace('<', '<').replace('>', '>');+ if (i < lines.length - 1)+ line = line + "<br/>";+ out.push(line);+ i++;+ }+ return out;+}+function _wrapInNode(tag, nodes, target, closingTag = null) {if (nodes.length === 0)return;@@ -106,7 +119,7 @@ function _wrapAndEscape(node, maxColumns = 0) {let text = node.text;text = text.replace(/`([^`]*)`/g, (match, code) => `<c>${code.replace('<', '<').replace('>', '>')}</c>`);- text = text.replace(/\[(.*?)\]\((.*?\))/g, (match, linkName, linkUrl) => {+ text = text.replace(/\[(.*?)\]\((.*?\))/g, (match, linkName, linkUrl) => {return `<a href="${linkUrl}">${linkName}</a>`;});const words = text.split(' ');