lesjoursfr / html-to-epub

Generate EPUB books from HTML with simple API in Node.js.
MIT License
39 stars 16 forks source link

feat: allow custom allowed attributes and tags #141

Closed crutchcorn closed 3 months ago

crutchcorn commented 3 months ago

This PR unblocks #140, as it allows user of the library to pass allowed attributes and tags to the epub generation.

e-adrien commented 3 months ago

Hey. Thank you so much for this PR.

Should we call Object.freeze() on exported default arrays to prevent modifications? Or is it too much?

export const defaultAllowedAttributes = Object.freeze([...]);
crutchcorn commented 3 months ago

We could do that! I don't think it's inherently required, but I could see that becoming a headache if someone accidentally pushes to it. Up to you!

e-adrien commented 3 months ago

It can wait for the issue then. 😄