镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

doc: active module page not highlighted in sidebar nav #34975

Description

@DerekNonGeneric

📗 API Reference Docs Problem

  • Version: n/a (current master branch)
  • Platform: n/a
  • Subsystem: docs

Location

Section of the site where the content exists

Affected URL(s):

Description

Concise explanation of the problem

See the title of the issue as is self-explanatory.

Working

image

Non-working

image

This was introduced relatively recently and probably has to do w/ the fact that there are <code> tags in there.

/cc @aduh95 as is most likely the most familiar w/ this problem


  • I would like to work on this issue and
    submit a pull request.

Activity

  1. aduh95 commented on Aug 29, 2020

    @aduh95
    Contributor

    Good catch! So I dig a bit into it, the issue comes from the fact that modules.html link comes before module.html in the list, and it transform the class attribute of the wrong element.

    Expected

    <li><a href="modules.html" class="nav-modules">Modules: CommonJS modules</a></li>
    <li><a href="esm.html" class="nav-esm">Modules: ECMAScript modules</a></li>
    <li><a href="module.html" class="nav-module active">Modules: <code>module</code> API</a></li>

    Actual

    <li><a href="modules.html" class="nav-module actives">Modules: CommonJS modules</a></li>
    <li><a href="esm.html" class="nav-esm">Modules: ECMAScript modules</a></li>
    <li><a href="module.html" class="nav-module">Modules: <code>module</code> API</a></li>

    Patch incoming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions