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

Supports syntax highlighting in markdown (uses python-markdown + pygments) #203

Merged
merged 1 commit into from
May 9, 2024

Conversation

wwwillchen
Copy link
Collaborator

@wwwillchen wwwillchen commented May 9, 2024

Instead of doing the markdown rendering client-side using marked.js, this changes our markdown component's implementation to instead do it on the server-side using python-markdown for markdown rendering and pygments for syntax highlighting.

Shifting it to server-side seems better because: 1) it ships less code to client-side which is more performant and 2) most of the heavy-lifting in Mesop apps is done on the server-side already so there wasn't much benefit to doing it client side.

Addresses part of #96.

@wwwillchen wwwillchen force-pushed the pygments branch 2 times, most recently from 72c51b0 to 6e2c8dc Compare May 9, 2024 21:32
@wwwillchen wwwillchen changed the title WIP: Supports syntax highlighting in markdown files by using python-markdo… Supports syntax highlighting in markdown (uses python-markdown + pygments) May 9, 2024
@wwwillchen wwwillchen merged commit 95f0b1e into mesop-dev:main May 9, 2024
2 checks passed
@wwwillchen wwwillchen deleted the pygments branch May 9, 2024 22:00
richard-to pushed a commit to richard-to/mesop that referenced this pull request May 13, 2024
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