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

Code formatter #385

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

franekwitt
Copy link

Added wasm code formatter and switched to prism.js highlighter.

@franekwitt franekwitt requested a review from twalen as a code owner May 22, 2024 15:17
oioioi/programs/static/code_formatter/formatter.js Outdated Show resolved Hide resolved
oioioi/programs/static/code_formatter/formatter.js Outdated Show resolved Hide resolved
oioioi/programs/static/code_formatter/formatter.js Outdated Show resolved Hide resolved
oioioi/programs/static/code_formatter/formatter.js Outdated Show resolved Hide resolved
oioioi/programs/static/code_formatter/clang-format.wasm Outdated Show resolved Hide resolved
metenn
metenn previously approved these changes Jun 5, 2024
// clang-format
async function cpp_code_formatter(source) {
await init();
console.log(version());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please include line-numbers plugin + c/cpp/pascal/python/java languages

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


<pre hidden id="raw_source">{{ raw_source }}</pre>

<pre id="visible_source" class="language-cpp"><code class="nohighlight">{{raw_source}}</code></pre>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use language class based on extension

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also add line-numbers class

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@A-dead-pixel A-dead-pixel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this locally again and found a few issues:

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.

4 participants