зеркало из
1
0
Форкнуть 0
Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
This commit is contained in:
Kristján Oddsson 2022-08-12 11:17:01 +02:00
Родитель 1b529ebeca
Коммит 8fa0ce656c
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -1,6 +1,6 @@
# &lt;details-dialog&gt; element
A modal dialog opened with a <details> button.
A modal dialog opened with a &lt;details&gt; button.
## Installation
Available on [npm](https://www.npmjs.com/) as [**@github/details-dialog-element**](https://www.npmjs.com/package/@github/details-dialog-element).

Просмотреть файл

@ -43,6 +43,10 @@ Include with a script tag:
\`\`\``
}
const escapeHTML = (html) => {
return html.replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&#039;');
}
export function readme(options) {
const {filename = 'README.md', exclude = [], title, preamble, footer} = options ?? {}
@ -53,7 +57,7 @@ export function readme(options) {
async packageLinkPhase({customElementsManifest}) {
const content = [
`# ${title || generateTitle({packageJson})}`,
packageJson.description,
escapeHTML(packageJson.description),
preamble,
generateInstallationInstructions({packageJson}),
`## Usage`,