Broken in Obsidian docs: Workspace.activeLeaf property

Steps to reproduce

  1. Open API’s documentation page for the Workspace.activeLeaf property.

    docs.obsidian.md/Reference/TypeScript+API/Workspace/activeLeaf

  2. Find the internal link for Workspace.getLeaf – located within the BlockQuote at the top of the page [1] – and click it.

Did you follow the troubleshooting guide? [Y/N]

Yes.

Expected result

The API’s documentation page for the Workspace.getLeaf method is opened.

Actual result

An error message is displayed.

The link destination “obsidian.workspace.getleaf_1.md” does not exist.

Environment

Browser: Google Chrome.


Additional information

Bug’s source

A syntax error causes this bug. On the page for [Workspace.activeLeaf], there is a typo in the URL for the internal link to Workspace.getLeaf.

  • The broken link contains getleaf_1.

    docs.obsidian.md/obsidian.workspace.getleaf_1

  • This should be changed to getLeaf_1.

    docs.obsidian.md/obsidian.workspace.getLeaf_1

Change property’s name

It feels strange using this method when:

  • the link on Workspace.activeLeaf tries to open Workspace.getLeaf, and
  • the targeted page is called Workspace.getLeaf

yet it is listed in the API as getLeaf_1.


  1. Warning: This API is now obsolete.

    The use of this field is discouraged. The recommended alternatives are: - If you need information about the current view, use [Workspace.getActiveViewOfType()]. - If you need to open a new file or navigate a view, use [Workspace.getLeaf].

    ↩︎

This link shows you where to report errors in the Developer Docs: https://docs.obsidian.md/Home#Contributing

Spoiler: it’s the GitHub.