- Resolves an issue where a namespace would not appear in the output - e.g.
islands|divwould simply showdiv.
- Better handling of spaces within at-rule parameters.
- Update
hast-util-to-htmlto version 3. - Resolves an issue where named functions inside at-rule parameters would not be properly highlighted.
- Adds the ability to render a virtual DOM. A new option,
stringifyis provided, which will yield the internal HAST to the supplied function. By default this useshast-util-to-html, so that you can use Midas to render HTML as before. But, iffalseis passed instead, Midas will return the HAST instead of a string; this makes it easy to use in libraries that rely on virtual DOM, such as React.
- The main
midasexport is now a constructor functionMidaswhich accepts an options object, and exposes a.stringifierproperty for PostCSS usage and aprocessmethod for other usage. - Midas cannot be passed in directly to PostCSS anymore, you must instantiate
it and then pass the instance's
stringifierproperty to PostCSS. - The
wrapoption will now wrap the root<code></code>node with<pre class="midas"></pre>. Unlike before, setting this tofalsewill not remove the<code></code>from the string, as virtual DOM requires a single root element. - The CLI for this module does not make sense now that Midas can yield virtual DOM as well as the previous behaviour of returning a string. It has been removed entirely.
- midas did not properly parse certain custom media queries and would crash in certain cases; this has now been fixed.
- Update postcss-value-parser to v3.3.0.
- Update postcss-selector-parser to v2.0.0.
- midas will now render spaces before/after function parentheses accurately. e.g. filter: blur( 5px ) will now render with the extra spaces.
- Now compiled with Babel 6.
- Adds a
wrapoption to enable configuration of the HTML container used by midas. - Bump dependencies.
- Fixes parsing of media query parameters since the recent update to postcss-value-parser.
- CLI command was added to the npm distribution.
- midas can now be consumed by an existing PostCSS instance.
- Initial release.