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

Casing of search result types should be consistent #634

Closed
waldyrious opened this issue Feb 4, 2018 · 5 comments
Closed

Casing of search result types should be consistent #634

waldyrious opened this issue Feb 4, 2018 · 5 comments

Comments

@waldyrious
Copy link
Contributor

Initially reported as part of #629. In the example there, a search for "markdown" (http://docs.julialang.org/en/latest/search/?q=markdown) produced the following results:

It's unclear why "(Function)" is in uppercase, while "(section)" and "(page)" are in lowercase. I would expect this to be consistent (all in lowercase).

This seems an easy enough issue that even someone not familiar with the codebase could fix, but I'd need some pointers regarding which files / lines to look at. Perhaps somewhere around here? https://github.com/JuliaDocs/Documenter.jl/blob/master/src/Utilities/Utilities.jl#L280-L284

@KristofferC
Copy link
Member

Maybe because Function is the Julia type Function which is spelled with capital F?

@waldyrious
Copy link
Contributor Author

@KristofferC the search results doesn't seem to provide a hint in this direction, though. Perhaps rendering it as code would make this clearer? I'd go as far as making it a subtle (i.e. unstyled) link to https://docs.julialang.org/en/stable/manual/functions/, but that may be overkill :)

@fredrikekre
Copy link
Member

I'm confused, it says Function because it is a link to the varinfo Function. Similar as there are sometimes methods that are documented, where it will instead say Method.

@mortenpi
Copy link
Member

mortenpi commented Feb 4, 2018

It comes from the doccat function and the capitalization seems to be an arbitrary choice (possibly due to how it the string was used in the Markdown builds). lowercase()-ing here, which is where the categories get written into the search index, should be easiest and least intrusive fix.

@waldyrious
Copy link
Contributor Author

Thanks for the pointer @mortenpi; I'll see if I can take a stab at that in the next few days.

waldyrious added a commit to waldyrious/Documenter.jl that referenced this issue Feb 15, 2018
this ensures that the category of entries in search results listings
(e.g. "function", "method", "module", "page", "section", etc.)
will be rendered consistently in lowercase.
@mortenpi mortenpi added this to the 0.14.0 milestone Feb 16, 2018
mortenpi pushed a commit that referenced this issue Feb 24, 2018
this ensures that the category of entries in search results listings
(e.g. "function", "method", "module", "page", "section", etc.)
will be rendered consistently in lowercase.

fix #634
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants