fumiX / fuBlog

Blog Software
https://blog.fumix.de
Apache License 2.0
2 stars 1 forks source link

Fix markdown converter (Promise/await issues) #13

Closed floscher closed 1 year ago

floscher commented 1 year ago

I've now setup the markdown converter as an abstract class that is implemented differently in client and server: class diagram

Can now be called like this and should work again: https://github.com/fumiX/fuBlog/blob/90f24d71e67220a5e8f39271d261891c00b91147/client/src/components/MarkDown.vue#L39

The issue was that normally marked.parse(input: string): string returns a string type. But it seems that it suddenly returns a promise if an async MarkedExtension is loaded.