zero-md

Ridiculously simple zero-config markdown displayer

ISC License

Downloads
6.4K
Stars
423
Committers
5

Bot releases are visible (Hide)

zero-md - v2.3.0

Published by zerodevx about 3 years ago

  • Refactor (simplify) MutationObserver code
  • Support partial rendering - render() will not re-stamp the DOM if there are no changes now
  • Run Prism highlight asynchronously with Web Workers; fall back to synchronous if unsupported
  • Update marked to v3
  • BREAKING: clearDom() is deprecated since partial rendering inserts or replaces instead
  • BREAKING: stampDom() is deprecated; operation split into stampStyles() and stampBody() respectively
  • BREAKING: makeFrag() is deprecated and replaced with makeNode()
zero-md - v2.2.0

Published by zerodevx over 3 years ago

  • Add feature auto re-render when inline markdown or style template changes (#51 - thanks @EmilePerron)
  • Update dependencies
zero-md - v2.1.1

Published by zerodevx over 3 years ago

  • Shift initial render call into element constructor (fixes #46)
  • Use latest stable instead of latest beta in /docs
  • Update dependencies
zero-md - v2.1.0

Published by zerodevx over 3 years ago

  • Refactor web-component initialisation logic (fixes #45)
  • Remove non-standard JSON import
zero-md - v2.1.0-rc.1

Published by zerodevx over 3 years ago

  • Fixes #45
zero-md - v2.0.1

Published by zerodevx almost 4 years ago

  • Update dependencies.
zero-md - v1.4.2

Published by zerodevx almost 4 years ago

  • Update docs.
zero-md - v2.0.0

Published by zerodevx almost 4 years ago

V2 is released! 🎉

Some breaking changes are introduced. If you're migrating from V1 to V2, please read the migration guide.

V1 has been moved into its separate tree - a final maintenance release is published, but in general no more updates will be done.

It is highly recommended to upgrade to V2 - it is modern, much cleaner and much easier to reason with. To get some context as to why, please read the V2 release candidate release notes.

V2 features include:

  • Automated hash-link scrolls
  • Built-in FOUC prevention
  • Automatically rewrite URLs relative to src
  • Automatically re-render when src changes
  • Support for >200 code languages with detection for unhinted code blocks
  • Easy styling mechanism
  • Highly extensible

Check out the V2 docs: https://zerodevx.github.io/zero-md/

zero-md - v1.4.1

Published by zerodevx almost 4 years ago

  • Maintenance update
zero-md - v2.0.0-rc.4

Published by zerodevx almost 4 years ago

  • Update src attribute change behaviour.
  • Add tick() function.
  • Refactor goto() function.
zero-md - v2.0.0-rc.3

Published by zerodevx about 4 years ago

  • no-shadow is immutable and must be set at element creation time
  • Update link handling logic
zero-md - v2.0.0-rc.2

Published by zerodevx about 4 years ago

  • Refactor dynamic script loading implementation
  • Don't reflect no-shadow
  • Slightly improve language detection
zero-md - v2.0.0-rc.1

Published by zerodevx about 4 years ago

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 - https://github.com/zerodevx/zero-md/pull/29#issuecomment-673305798
  • 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"> - https://github.com/zerodevx/zero-md/issues/34
  • Global configurations are set on window.ZeroMdConfig object instead.
  • All relative URLs in markdown are now normalised to the src path - fixes https://github.com/zerodevx/zero-md/issues/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 https://github.com/zerodevx/zero-md/issues/23 should not happen.
  • <zero-md> now automatically re-renders if src changes, and manual-render is not set - https://github.com/zerodevx/zero-md/issues/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 - https://github.com/zerodevx/zero-md/issues/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 https://github.com/zerodevx/zero-md/issues/25
  • Renamed master to main.
zero-md - v1.4.0

Published by zerodevx about 4 years ago

  • Add support for <script type="text/markdown"> with dedenting - thanks @bennypowers! (ref: #29)
  • Update dependencies.
zero-md - v1.3.4

Published by zerodevx over 4 years ago

  • Update dependencies.
zero-md - v1.3.3

Published by zerodevx almost 5 years ago

  • Fixed typo that broke C syntax highlighting - thanks @TheUnlocked! (ref: PR#21)
  • Add usage note on webcomponentsjs polyfill regression in FFv60. (ref: #19)
  • Update dependencies.
zero-md - v1.3.2

Published by zerodevx about 5 years ago

  • Maintenance update of dev dependencies.
  • New releases are a breeze now.
zero-md - v1.3.1

Published by zerodevx over 5 years ago

  • Actually build for v1.3.1 (fixes #15).
  • Automate the chore of version bumping else I keep missing things.
zero-md - v1.3.0

Published by zerodevx over 5 years ago

  • Exposes the ZeroMd.config global to set default values applying to all instances of <zero-md> in the document. (Ref: PR#12) - thanks @bennypowers!
  • Update default host CSS to help normalise behavior across browsers. Fixes #13 - thanks @bennypowers!
  • Publish on NPM to support modern workflows per #11.
zero-md - v1.2.2

Published by zerodevx over 5 years ago