Closed flamewave000 closed 2 years ago
I am actually updating module credits to use esmodule instead, which should solve this conflict as my version of marked wont be used outside of my module. At least that is my understanding.
EDIT: To be clear, I am not opposed to using a library either. I just was working on Module Credits this past weekend to update it to the new version of foundry and decided to switch it to a esmodule to try and self contain my modules a little.
I can install your module (Already using quite a few I am sure DF Chat enhancements is amazing like the rest) and verify if my updated module resolves the conflict.
Just confirmed, in the next release of module credits our modules do not conflict. However, if you do want to expand marked into a library, we can go from there.
Resolved in version 0.0.4.0 (I don't fully understand ES Modules, but if I understand them correctly, this should no longer cause a conflict.)
Sounds good. I think a library module would be good too though so users only need to download one copy of Marked instead of two.
Esmodules essentially "scope" your code so that they can only access things in the globalThis
and what ever is directly imported, and nothing outside a module can see inside it. So any regular script running in the window cannot see anything defined inside a module.
A user reported this conflict here: DF Chat Enhancements: Module Credits #298.
It appears we are both using the
marked
library, but maybe different versions. Mine uses themarked.parse()
function to convert markdown to HTML, while yours appears to usemarked()
instead.I just want to reach out and see if we can resolve this some way that works best. I was kind of thinking that since Markdown is a very popular format, maybe a Library Module would make sense, similar to arcanist's Ace Library.