-
Notifications
You must be signed in to change notification settings - Fork 5
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
Better code styling (back to Rouge) #399
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wJoenn
reviewed
Dec 3, 2023
wJoenn
previously requested changes
Dec 3, 2023
pil0u
reviewed
Dec 3, 2023
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.
Rouge is back! 🚀 on a le meilleur des deux mondes je pense maintenant, gg
Quelques petits commentaires, et merger main
pour voir si les styles tiennent toujours
149e9e8
to
12bf582
Compare
pil0u
approved these changes
Dec 4, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes and context
Commonmarker 1.0 se repose sur comrak qui elle-même se repose sur syntect. Syntect ne supporte (pour l'instant?) que les syntaxes de langage supportées par SublimeText par défaut.
C'est trop limitant, bcp de langages modernes ne sont pas dedans (particulièrement TypeScript).
L'ancienne version de Commonmarker se repose sur libcmark-gfm et n'a pas autant d'options, mais permet de parcourir l'AST du Markdown avant génération du HTML. Cette PR revient donc à cette version de Commonmarker afin d'exploiter cette feature pour re-process les
code_block
s, leur set le langage par défaut (vu que l'option n'existe pas dans cette version), puis les passer dans Rouge pour s'occuper de la coloration syntaxique au lieu desyntect
.Fixes #387.
Rendu final:
![Capture d’écran 2023-12-04 à 14 56 15](https://private-user-images.githubusercontent.com/2871879/287719985-c247c740-00ab-4d54-9831-715058c48180.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NTE2MjEsIm5iZiI6MTczOTU1MTMyMSwicGF0aCI6Ii8yODcxODc5LzI4NzcxOTk4NS1jMjQ3Yzc0MC0wMGFiLTRkNTQtOTgzMS03MTUwNThjNDgxODAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMTY0MjAxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODg4MzM4MzQ0MjlkMGVhNWQ1ZDUxM2FjNjE3NzE4Yjg3MzUzNmFhYTFhM2QxNDRmOGM0MDUyNDk1ZGQwODU4MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.ZquZAOjKrPIN1Sz8O2Szg6yWmTTif0HMdKD6i8aj_9k)