foundation / inky

Convert a simple HTML syntax into tables compatible with Foundation for Emails.
http://foundation.zurb.com/emails
673 stars 107 forks source link

Attributes of html tags are converted to lowercase #99

Closed liayn closed 6 years ago

liayn commented 6 years ago

We are using custom tags inside our mail templates. Running them through inky makes all attributes lowercase, which breaks other transformers down the compile pipeline as those are case sensitive.

As mentioned in #18 self-closing tags are also converted to empty tags.

<f:uid.page pageUid="123" />

gets

<f:uid.page pageuid="123"></f:uid.page>

but should be preserved.

I'm using version 1.3.7 currently.

liayn commented 6 years ago

I could solve this by setting this configuration:

.pipe(inky({
    cheerio: {
        xmlMode: true,
        lowerCaseAttributeNames: false
    }
}))