Skip to content

v2.0.0-rc.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@zerodevx zerodevx released this 12 Oct 16:35
· 241 commits to main since this release

V2 is a re-write. It is feature-complete, so all existing V1 features (including those from contributors - thank you!) should also be found here. Some breaking changes are introduced.

Component changes:

  • <xmp> tag support is dropped; use <script type="text/markdown"> instead - #29 (comment)
  • De-dent is now opt-in via the data-dedent attribute like this: <script type="text/markdown" data-dedent>
  • <zero-md> will always try to load from src attribute first; if it's falsy (no src attribute, src download fails, src is an empty file etc.), then it falls-back on <script type="text/markdown">.
  • The attributes css-urls, prism-url and marked-url are removed. <zero-md> only accepts src, manual-render and no-shadow.
  • <template> tags should now be used only to house styles. That includes <link rel="stylesheet"> (for loading external stylesheets), and standard <style> tags.
  • Custom styles can now be merged in using <template data-merge="append | prepend"> - #34
  • Global configurations are set on window.ZeroMdConfig object instead.
  • All relative URLs in markdown are now normalised to the src path - fixes #22
  • zero-md-marked-ready and zero-md-prism-ready custom events are dropped. Use zero-md-ready instead.
  • There is now universal code highlighting for most languages, so a repeat of #23 should not happen.
  • <zero-md> now automatically re-renders if src changes, and manual-render is not set - #26
  • However, changes to <script type="text/markdown"> are not observed. This is best handled outside the remit of <zero-md> through a MutationObserver recipe.
  • A zero-md-error custom event is now emitted if non-fatal HTTP errors are detected - #31 - more will be written on this.

Tooling changes:

  • Testing has undergone a major fat trim. None of that web-component-tester and selenium and headless-chrome with bower with fixture-element and all that bloatware. Really, you just need mocha and chai asserts and run them off your browser.
  • Just write standardjs and move on.
  • Rollup to watch, serve and build.
  • Totally remove all remnants of HTMLImports (good riddance) and fixed package.json. ES imports should now work as expected - fixes #25
  • Renamed master to main.