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

feat(html): allow generating JSON representation of HTML output #686

Merged
merged 2 commits into from
Jan 4, 2025

Conversation

crowlKats
Copy link
Member

No description provided.

@@ -1145,6 +1145,190 @@ pub fn generate(
Ok(files)
}

pub fn generate_json(
Copy link
Member Author

Choose a reason for hiding this comment

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

this blob has a decent amount of duplicated logic. it is not often-changing, but still. i'll think about how this could be deduplicated in a follow-up

ctx.file_mode == FileMode::SingleDts,
);

if categories.len() == 1 && categories.contains_key("Uncategorized") {
Copy link
Member

Choose a reason for hiding this comment

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

Consider cleaning this up later to use static UNCATEGORIZED: &str = "Uncategorized"

@crowlKats crowlKats merged commit f559dbe into main Jan 4, 2025
5 checks passed
@crowlKats crowlKats deleted the html-as-json branch January 4, 2025 00:11
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