markedjs / marked

A markdown parser and compiler. Built for speed.
https://marked.js.org
Other
32.84k stars 3.38k forks source link

4.0.2 broke current functionality #2282

Closed blackfalcon closed 2 years ago

blackfalcon commented 2 years ago

Marked version: 4.0.2

Describe the bug With the release of v4.0.2 I now get this error

Uncaught ReferenceError: exports is not defined
    at unpkg.com/marked@4.0.2/marked.min.js:6

With v4.0.1 the same code has no error.

To Reproduce Steps to reproduce the behavior:

      fetch('/demo/demo.md')
        .then((response) => response.text())
        .then((text) => {
          const rawHtml = marked.parse(text);
          document.querySelector('main').innerHTML = rawHtml;
          Prism.highlightAll();
        });

Expected behavior

A patch update not to break the previous version.

fu-sen commented 2 years ago

I also had a project that worked with v4.0.0-4.0.1 but nowv4.0.2 doesn't work. I once had to revert to the Marked v4.0.0-v4.0.1 source. https://github.com/fu-sen/strapdown https://github.com/fu-sen/strapdown.js

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 4.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

fu-sen commented 2 years ago

I was able to confirm that v4.0.3 works. I will reflect that in the project.