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 mupdf-sys docs #106

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

ginnyTheCat
Copy link
Contributor

@ginnyTheCat ginnyTheCat commented Jan 31, 2025

Parses the mupdf docs and converts them into a more docs.rs friendly format. It links other types and functions and puts some parameter names in markdown inline code apostrophes. It also escapes <, >, [ and ] as docs.rs will interpret them as HTML or links otherwise, causing the <path> tag to disappear as in the pink highlighted example below.

It also splits at every linebreak, which sometimes looks a bit unnecessary, but cases like the last example from the table below are otherwise unreadable.

Because of the very different styles of comments across the mupdf codebase some weird formatting issues might happen with this change, but I've looked for these cases and haven't found any yet.

Here are some comparisons:

Before After
imagen imagen
imagen imagen
imagen imagen
imagen imagen

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