Comments (4)
Hi - thanks for highlighting this. I believe it's a bug because I didn't handle the edge case whereby an instance may be disconnected, then reconnected again, without being re-instantiated.
Internally, there are 2 pre-requisites before zero-md
can begin its rendering op:
- Marked and Prism must be loaded; and
- The instance must be connected.
The waitForReady()
function basically ensures that these 2 conditions are met.
I'll try to think of a better way to handle this and roll-out a bug fix soon. At the same time, I'll remove the (non-standard) JSON import so that you should be able to consume via the recommended way:
import ZeroMd from 'zero-md'
customElements.define('zero-md', ZeroMd)
render() {
...
}
Thanks again!
from zero-md.
Hi @jonmann20 - fixed it! Could you kindly help see if the issues are resolved? The latest version v2.1.0-rc.1
is in pre-release so if you could run this:
npm i -D zero-md@next
then consume using:
import ZeroMd from 'zero-md'
customElements.define('zero-md', ZeroMd)
render() {
...
}
and let me know if anything else crops up? 🙏
from zero-md.
Worked perfect, thanks for the quick response!
from zero-md.
Thanks for bringing this issue up! This should be fixed with the latest release. I'll mark this issue as closed for now - but do re-open this if it happens again. 🍻
from zero-md.
Related Issues (20)
- Thanks a ton!
- Parsing img tags in md [ERROR with src] HOT 1
- fallback markdown script renders as code block HOT 1
- Marked.js v5 support HOT 2
- github markdown emoji HOT 3
- How to use zeroMd as module? HOT 3
- Cyrillic anchor links doesn't works HOT 2
- nginx example HOT 3
- BUG: `goto` (scroll to selected element) broken when `no-shadow` enabled HOT 2
- Discussion: Anchor.js usability (for on-hover anchor links) HOT 5
- Mathjax zero-md@{1,2} bug HOT 3
- Mathjax no-shadow window.ZeroMdConfig HOT 2
- Render Mathjax on content change HOT 2
- Is there a way to use mathjax while still supporting shadow dom? HOT 2
- Does zero-md support admonition marked plug-in? HOT 7
- Parse/Render text within HTML tags HOT 2
- prism.js seems to not recognize C++? HOT 3
- Mermaid Support Broken Since Version 2.5.1 HOT 3
- Display table of content TOC HOT 4
- Markdown not translated into HTML HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zero-md.