frontarm / mdx-util

Utilities for working with MDX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cant set wrapper at compile time

plexigras opened this issue · comments

with a default wrapper factory this could be simplified

https://github.com/jamesknelson/mdxc/blob/3f05f56c3e8ddc0a32b72bfa65d6f28e0ee6535b/source/mdxc.js#L154-L158

to this

 `  const { 
 ${['wrapper'].concat(tags).map(tag => 
 `    ${tag} = ${this.getFactoryForTag(tag)},` 
 ).join('\n')}
  } = factories`