Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(frontend): Improve highlighting of code samples#2538

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
JacobCoffee wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromhighlight-code-samples

Conversation

JacobCoffee
Copy link
Member

What

Add highlighting for the prompt marker in the code samples.

Refactor the html formatting so that the html tags are automatically generated and don't have to be written manually in the code samples sources.

Add highlighting for the prompt marker in the code samples.Refactor the html formatting so that the html tags are automaticallygenerated and don't have to be written manually in the code samplessources.
@timhoffm
Copy link

timhoffm commentedSep 12, 2024
edited
Loading

From original PR:

format_html() is actually a poor man's pygments, but I did not want to introduce this dependency. However, switching to pygments would be straight forward, if one wants to have full-fledged highlighting at some point in the future.

Not sure whether it was not the case at the time of the original PR or whether I just didn't know, but sphinx depends on pygments, so it's available in your doc build environment and you could use that instead of this manual approach.

@JacobCoffee
Copy link
MemberAuthor

@timhoffm I'm not sure that we install docs deps where this is used, but I can check tomorrow. pygments is okay with me if it cleans up some cruft

timhoffm and hugovk reacted with thumbs up emoji

@ewdurbin
Copy link
Member

I would lean towards using pygments.

hugovk and ezio-melotti reacted with thumbs up emoji

@JacobCoffeeJacobCoffee changed the titleImprove highlighting of code samplesfeat(frontend): Improve highlighting of code samplesSep 16, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ewdurbinewdurbinAwaiting requested review from ewdurbinewdurbin is a code owner

At least 0 approving reviews are required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@JacobCoffee@timhoffm@ewdurbin

[8]ページ先頭

©2009-2025 Movatter.jp