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

Rename ComrakFoo types to just Foo for easier usage #320

Merged
merged 3 commits into from
Jun 17, 2023

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jun 16, 2023

There are a few types whose names start with Comrak:

ComrakExtensionOptions
ComrakOptions
ComrakParseOptions
ComrakPlugins
ComrakRenderOptions
ComrakRenderPlugins

This sort of naming is somewhat redundant - they are longer & clunky to work with, even though they are unlikely to conflict with anything. This PR removes the Comrak prefix so they are more ergonomic. Any users who do have conflicts can use e.g. comrak::Plugins.

This PR also adds aliases for the old type names, so no workflows are affected.

Also provides exported types that allow using the legacy names.
@kivikakk
Copy link
Owner

Thanks, this is a very tidy change. I'll merge it when I'm next on the project!

@@ -1,10 +1,10 @@
// Update the "comrak --help" text in Comrak's own README.
// Update the "comrak --help" text in 's own README.
Copy link
Owner

Choose a reason for hiding this comment

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

A reminder to me to fix this up pre-merge and do another once-over.

Suggested change
// Update the "comrak --help" text in 's own README.
// Update the "comrak --help" text in Comrak's own README.

@kivikakk kivikakk merged commit f980f4e into kivikakk:main Jun 17, 2023
@tgross35
Copy link
Contributor Author

Thanks!

@tgross35 tgross35 deleted the struct-renaming branch June 17, 2023 03:22
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