Closed ThaDaVos closed 5 years ago
Hi! Could you show (though a gist or just copying your code in this issue) how you pass that generator to the library, and the body of that generator?
Here it is: https://gist.github.com/dvdbot/a690f72064f797e9ec96db971560b7ed
I'm also noticing that when building webpack always generates the same hashes for the files...
I had a look and tried to reproduce the issue. I commented out the if/else in line 22 to force md
to always use markdown_it_plantuml_options_production
. In that scenario, other parts of the program failed (probably because I don't have the same folder structure than you), but the generated markdown contained the local URL as expected.
Could you try forcing the use of prod config like I did, to discard an issue with this library?
I also tried that but it didn't seem to work - let me try again
For me it isn't working but like I said - the webpack always generates the same hashes...
Where are you looking for the url?
I checked the URL in the html produced in dist/index.html.
It says plantuml.com for me...
Something else is acting fishy I think...
NVM, this issue can be closed - just tried it on a collegue's pc and it just works there - so, somehow my webpack is broken and keeps re-using the same cache - if you know why, please enlight me 😂
btw, quick question - is it possible to get the name from the uml itself? See below (it's officially supported by PlantUML itself) and I kind of need it for pre-genning the images @startuml {NAME} @enduml
There is no way to obtain that parameter within the generator function, but you can create a new ticket requesting that feature 😄 .
Just did - hope it's clear enough https://github.com/gmunguia/markdown-it-plantuml/issues/14
I created a custom generator which returns a custom url for loading the image (this url goes to a local path where plantuml diagrams are generated using node-plantuml) but even though I'm returning a new url when checking the generated source files when building (I'm using VuePress) it still shows the url to the plantuml server... why?
My console.logs in my custom generate source function are being executed...