Skip to content

posthtml options for singleTags doesn't appear to be working #744

Description

@bravecrayon
  • Maizzle Version: 4.0.2
  • Node.js Version: 14.19.3

I'm following the documentation for setting up singleTags for a <custom> element – I think exactly the same use case as in the docs. I feel like I must be doing something silly wrong, but maybe it's a bug?

In config.js, I've have:

module.exports = {
  build: {
    templates: {
      source: 'src/templates',
      destination: {
        path: 'build_local',
      },
      assets: {
        source: 'src/images',
        destination: 'images',
      },
    },
    posthtml: {
      options: {
        singleTags: ['custom']
      }
    }
  },
}

In src/layouts/main.html, my expection is it would take this and render it as-is, with tags closed:

  <custom name="opencounter" type="tracking" />
  <custom name="usermatch" type="tracking" />

However, the result I have is:

  <custom name="opencounter" type="tracking">
  <custom name="usermatch" type="tracking">

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions