-
Notifications
You must be signed in to change notification settings - Fork 4
Features Support #6
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
Conversation
|
@g-plane it would be great if you can have a quick review of it, or I think we could merge it first |
g-plane
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though I haven't run it locally, code looks OK, but there're some trivial problems.
| setTimeout(() => { | ||
| isMarkerLoaded = true; | ||
| }, 2000); | ||
| return await markdownToHtml(readme, context.sandbox); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We aren't in try...catch block, so we can simplify like this:
| return await markdownToHtml(readme, context.sandbox); | |
| return markdownToHtml(readme, context.sandbox); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There need to wait for code colorize to complete
playground-plugin/src/markdown.ts
Lines 30 to 41 in b8dc614
| for (const match of matches) { | |
| const [source, code] = match | |
| const colorized = await sandbox.monaco.editor.colorize( | |
| unescape(code), | |
| 'typescript', | |
| {} | |
| ) | |
| rendered = rendered.replace( | |
| source, | |
| `<code class="language-ts">${colorized}</code>` | |
| ) | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, but here it just returns the result of markdownToHtml, so nothing different. Anyway, this isn't blocker.
g-plane
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
When I practice with type-challenges, I notice that I need a complete tool to get through the process quickly. Then I found this plugin and made some optimizations for it.
Effect

Feature Supported