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

Problem with the new search plugin when I use content tabs #3147

Closed
5 tasks done
odysseus1973 opened this issue Oct 26, 2021 · 3 comments
Closed
5 tasks done

Problem with the new search plugin when I use content tabs #3147

odysseus1973 opened this issue Oct 26, 2021 · 3 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@odysseus1973
Copy link

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

When I use content tabs I have a problem with new search plugin (insiders version)

Expected behaviour

Screenshot 2021-10-26 141244

Actual behaviour

Screenshot 2021-10-26 140956_1

Steps to reproduce

  1. create new docs with mkdocs material theme and mkdocs.yml from Configuration section
  2. paste this code
=== "HTTP"

    ``` http
    POST /connect/token HTTP/1.1
    Host: sso.asna.cloud:5000
    Content-Type: application/x-www-form-urlencoded
    Cache-Control: no-cache

    client_id=E45D3491-79EE-4EEA-92B2-22CEBE4BB8B5&client_secret=1234567&grant_type=client_credentials
    ```
=== "C# (RestSharp)"

    ``` csharp
    var client = new RestClient("https://sso.asna.cloud:5000/connect/token");
    client.Timeout = -1;
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
    request.AddParameter("client_id", "E45D3491-79EE-4EEA-92B2-22CEBE4BB8B5");
    request.AddParameter("client_secret", "1234567");
    request.AddParameter("grant_type", "client_credentials");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    ```
=== "CURL"

    ``` bash
    curl --location --request POST 'https://sso.asna.cloud:5000/connect/token' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'client_id=E45D3491-79EE-4EEA-92B2-22CEBE4BB8B5' --data-urlencode 'client_secret=1234567' --data-urlencode 'grant_type=client_credentials'
    ```
  1. run command: mkdocs serve
  2. try to search "http"

Package versions

  • Python: 3.8.10
  • MkDocs: 1.2.3
  • Material: 7.3.4+insiders.3.1.4

Configuration

site_name: TEST
nav:
  - Старт: index.md
theme:
  name: material
  language: ru
  features:
    - search.suggest
    - search.highlight
    - search.share
    - content.code.annotate
    - content.tabs.link
    - navigation.top  
  font:
      text: Roboto
      code: Roboto Mono
markdown_extensions:
  - pymdownx.details
  - pymdownx.highlight:
      linenums: true
  - pymdownx.inlinehilite
  - pymdownx.mark
  - pymdownx.superfences
  - pymdownx.tabbed:
       alternate_style: true 
  - pymdownx.tilde
  - pymdownx.snippets
plugins:
  - search:
      lang:
        - en
        - ru
  - autolinks
  - section-index

System information

  • Operating system: Windows 11
  • Browser: Chrome
@squidfunk
Copy link
Owner

Thanks for reporting! This is a problem with the linenums flag. I'll look into it.

@squidfunk squidfunk added the bug Issue reports a bug label Oct 26, 2021
@squidfunk
Copy link
Owner

squidfunk commented Oct 27, 2021

Fixed in 118145f2b – line numbers are now excluded from the search index.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Oct 27, 2021
@squidfunk
Copy link
Owner

Released as part of 7.3.5-insiders-3.1.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants