Skip to content

feat: update copycode js #180

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

Merged
merged 1 commit into from
Mar 25, 2025
Merged

feat: update copycode js #180

merged 1 commit into from
Mar 25, 2025

Conversation

JTorreG
Copy link
Collaborator

@JTorreG JTorreG commented Mar 19, 2025

Proposed changes

Some code blocks that are being migrated from Unit have comments in the shell/console blocks in # form.

This update aims to improve the copy-code block javascript to detect and remove comments in shell code blocks.

It also updates the function to detect and remove # and $ at the beginning of console/bash commands

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • I have updated any relevant documentation (README.md and CHANGELOG.md)

@JTorreG JTorreG requested a review from a team as a code owner March 19, 2025 14:09
Copy link

❌ One or more of the commit messages in this PR do not match the nginx-hugo-theme git guidelines, please check the CI job for more details on which commits were flagged and why.

Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

@JTorreG JTorreG force-pushed the remove-comments-oncopy branch from a144367 to 9fe221f Compare March 24, 2025 11:34
For v1 CodeCopy only. v2 will require an different
implementation since the code is generated at build
time instead of run time.
@nginx-jack nginx-jack force-pushed the remove-comments-oncopy branch from 67dcaeb to 16ec104 Compare March 25, 2025 10:36
Copy link

Playwright visual snapshot differences were detected.

View the Playwright report
To approve the snapshot changes and update the snapshots, please comment: /approve-snapshots

@nginx-jack
Copy link
Collaborator

Ran and checked locally. LGTM. I've created a ticket for how this will work with codeblock v2.
Bypassing playwright, timeout needs investigation. Screenshots themselves look as expected.

@nginx-jack nginx-jack merged commit 50c89d2 into main Mar 25, 2025
5 of 7 checks passed
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.

2 participants