I noted this on the Discord (https://discord.com/channels/1464542801676206113/1464926468751753269/1466189688338518016): all my repos have fancy centered text and floating images that aren't (yet?) supported.
| https://www.npmjs.com/package/create-typescript-app |
https://npmx.dev/package/create-typescript-app |
|
|
@danielroe sent a link to:
|
const ALLOWED_ATTR: Record<string, string[]> = { |
|
a: ['href', 'title', 'target', 'rel'], |
|
img: ['src', 'alt', 'title', 'width', 'height'], |
|
source: ['src', 'srcset', 'type', 'media'], |
|
th: ['colspan', 'rowspan', 'align'], |
|
td: ['colspan', 'rowspan', 'align'], |
|
h3: ['id', 'data-level'], |
|
h4: ['id', 'data-level'], |
|
h5: ['id', 'data-level'], |
|
h6: ['id', 'data-level'], |
|
blockquote: ['data-callout'], |
|
details: ['open'], |
|
code: ['class'], |
|
pre: ['class', 'style'], |
|
span: ['class', 'style'], |
|
div: ['class', 'style', 'align'], |
|
} |
I'll send a PR in a moment, just filing this issue for easier tracking. 🙂 It's more work than I'd hoped!
I noted this on the Discord (https://discord.com/channels/1464542801676206113/1464926468751753269/1466189688338518016): all my repos have fancy centered text and floating images that aren't (yet?) supported.
@danielroe sent a link to:
npmx.dev/server/utils/readme.ts
Lines 139 to 155 in 88e5b89
I'll send a PR in a moment, just filing this issue for easier tracking. 🙂It's more work than I'd hoped!