Skip to content

Anchor link is incorrectly referenced in Flame Graph documentation #2735

@hysan

Description

@hysan

The anchor link to Filtering out Node.js internal functions on the Flame Graph documentation page is referenced incorrectly here:

It's useful to [apply some cleanup](#filtering-out-node-internal-functions) for a more readable graph

Based on the title of the subsection, the anchor link should instead be: #filtering-out-node-js-internal-functions

This affects the en, ja, and zh-cn versions of diagnostics-flamegraph.md.

Fix

I've already went ahead and make a fix for the en version as that is straightforward and will submit a PR. For the ja and zh-cn versions though, the fix isn't as simple. The anchor links for the documentation is auto-generated. From my observations, non-ASCII characters are ignored and because of that, the anchor link for these sections and up being:

  • ja docs - Node.js の内部関数を除外する == #node-js
  • zh-cn docs - 过滤掉 Node.js 的内置函数 == #node-js

Subsequent sections that similarly are stripped down to just #node-js have auto-numbering that looks like #node-js-1. So if the link is fixed by linking to #node-js, future versions of the docs might break the link again if a new section is added that precedes that section.

A better fix might be to define the name of the anchor link in the ja and zh-cn version of the docs, but before I proceed to do so, I'd like to know what approach is desired. Thoughts?

Sidenote

In searching for the affected file, I also noticed that the ko index links to a non-existent ko version of the diagnostics-flamegraph.md file. The link should either be removed or changed to point to the doc in a different language. Should that be done in this bug fix or in a separate issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions