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

Introduce fmt reset (working title prune) and fix JSON frontmatter handling #681

Merged
merged 8 commits into from
Oct 10, 2024

Conversation

sourishkrout
Copy link
Member

@sourishkrout sourishkrout commented Oct 10, 2024

Most recently lifecycle identity has become entirely optional, we want to provide a command that "resets" markdown documents' lifecycle identity via runme fmt sub commands.

  1. runme fmt will continue to leave existing LCID untouched. runme fmt reset will remove any unless the --identity setting (default none) is overwritten.
  2. Reset will strip Runme-related frontmatter, leaves unrelated in tact.
  3. The PR fixes bugs with JSON-encoded frontmatter.
  4. Adds unit tests for all the changes.

@sourishkrout sourishkrout marked this pull request as draft October 10, 2024 00:32
@sourishkrout sourishkrout marked this pull request as ready for review October 10, 2024 15:11
@pastuxso
Copy link
Collaborator

@sourishkrout, Running runme fmt --identity cell --write, modifies the runme version, is it ok?

diff --git a/frontmatter/README.md b/frontmatter/README.md
index b0d16a5..caca01d 100644
--- a/frontmatter/README.md
+++ b/frontmatter/README.md
@@ -1,7 +1,7 @@
 ---
 runme:
   id: 01HMCJRVF90ED0TXZ0B9D7YYCB
-  version: v2
+  version: v3
 ---

Copy link

sonarcloud bot commented Oct 10, 2024

@sourishkrout
Copy link
Member Author

Running runme fmt --identity cell --write, modifies the runme version, is it ok?

Yes, it's supposed to reformat and overwite the major version used at the time.

Copy link
Collaborator

@pastuxso pastuxso left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@sourishkrout sourishkrout merged commit 5296bd4 into main Oct 10, 2024
7 checks passed
@sourishkrout sourishkrout deleted the seb/fmt-prune branch October 10, 2024 16:05
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