Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix markdown converter (Promise/await issues) #13

Merged
merged 4 commits into from
Jan 12, 2023

Conversation

floscher
Copy link
Contributor

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:

sanitizedHtml.value = await MarkdownConverterClient.Instance.convert(props.markdown ?? "");

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.

@floscher floscher marked this pull request as ready for review January 11, 2023 09:13
@floscher floscher merged commit e1fc4ea into fumiX:main Jan 12, 2023
@floscher floscher deleted the markdown-converter branch January 12, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant