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

Improve code readability #13

Merged
merged 29 commits into from
Feb 27, 2024
Merged

Improve code readability #13

merged 29 commits into from
Feb 27, 2024

Conversation

maxim-uvarov
Copy link
Member

> git diff (git describe --tags --abbrev=0 HEAD) HEAD -- nudoc/run.nu | aichat 'summarize changes'
The changes made are as follows:

  1. Updated the comments and the description of the function to be more clear and descriptive.
  2. Changed the default output file extension from any file to specifically a .md file.
  3. Modified the assemble-script function to handle errors and enclose > commands into try blocks to avoid errors and output their messages.
  4. Added a new function backup-file to create a backup of the file before overwriting it.
  5. Added new functions escape-quotes, nudoc-block, highlight-command, trim-comments-plus, try-append-echo-in, try-handle-errors, and execute-code.
  6. Updated the assemble-script function to make use of the new functions added.
  7. Added a new function parse-block-index to parse the block index from the Nu output lines.
  8. Updated the assemble-results function to utilize the new functions and provide a more refined output.

@maxim-uvarov maxim-uvarov merged commit 93eedfd into main Feb 27, 2024
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.

1 participant