fix(xmldocs): over-greedy regex for md links and clean-up (#5798)
* fix(xmldocs): over-greedy regex for Markdown links * fix(dotnet): missing using and extra spaces
This commit is contained in:
parent
6a8c8d9c87
commit
43de259522
|
|
@ -39,6 +39,7 @@ using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
|
||||||
|
|
@ -118,11 +118,11 @@ function _wrapAndEscape(node, maxColumns = 0) {
|
||||||
|
|
||||||
|
|
||||||
let text = node.text;
|
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>`;
|
return `<a href="${linkUrl}">${linkName}</a>`;
|
||||||
});
|
});
|
||||||
text = text.replace(/\[(.*?)\]/g, (match, link) => `<see cref="${link}" />`);
|
text = text.replace(/(?<!`)\[(.*?)\]/g, (match, link) => `<see cref="${link}"/>`);
|
||||||
|
text = text.replace(/`([^`]*)`/g, (match, code) => `<c>${code.replace('<', '<').replace('>', '>')}</c>`);
|
||||||
const words = text.split(' ');
|
const words = text.split(' ');
|
||||||
let line = '';
|
let line = '';
|
||||||
for (let i = 0; i < words.length; i++) {
|
for (let i = 0; i < words.length; i++) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue