Skip to content

Searching C++ doc by URL is broken #2463

Open
@AMagill

Description

@AMagill

Bug report

OS information

Tested using:

  • Windows Chrome 134.0.6998.89
  • Android Chrome 134.0.6698.96
  • Windows Firefox 136.0.1
  • Android Firefox 136.0.2

Steps to reproduce

Enter URL in browser:
https://devdocs.io/#q=c++%20std::min

According to http://devdocs.io/help#search, that should do a search in the C++ doc for std::min. Instead, it searches the C++ doc for std::min, with two leading spaces, and shows poor quality search results. Manually removing those leading spaces in the search box causes good search results to come up again.

I've used this feature for keyword searches from my browsers' URL bar for a long time, except as https://devdocs.io/#q=cpp%20%s (cpp rather than c++), but starting very recently, that no longer selects the doc I intended.

Possible fix

Trim leading spaces on C++ search terms from the URL!

Alternatively, it seems like it would be slightly cleaner if single-doc searches could be done with URLs like:
https://devdocs.io/cpp/#q=std::min

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions