Code formatter#385
Open
franekwitt wants to merge 7 commits into
Open
Conversation
otargowski
reviewed
May 22, 2024
metenn
reviewed
May 28, 2024
metenn
previously approved these changes
Jun 5, 2024
twalen
requested changes
Jun 5, 2024
| // clang-format | ||
| async function cpp_code_formatter(source) { | ||
| await init(); | ||
| console.log(version()); |
Contributor
There was a problem hiding this comment.
please include line-numbers plugin + c/cpp/pascal/python/java languages
|
|
||
| <pre hidden id="raw_source">{{ raw_source }}</pre> | ||
|
|
||
| <pre id="visible_source" class="language-cpp"><code class="nohighlight">{{raw_source}}</code></pre> |
Contributor
There was a problem hiding this comment.
please use language class based on extension
otargowski
requested changes
Jun 14, 2024
otargowski
left a comment
Contributor
There was a problem hiding this comment.
I tested this locally again and found a few issues:
- Pascal code isn't being highlighted (but python and java are)
- after clicking "Format code" the line numbers disappear
<>=&*+-%!are wrongly highlighted - their background is white. Seems to be a theme issue (PrismJS/prism#1347).
This file contains hidden or 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
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.
Added wasm code formatter and switched to prism.js highlighter.