Skip to content

[BUG] Backlinks doesn't support setext headers for title #227

@pegasushyper

Description

@pegasushyper

Script name

backlinks

Script authors

@dohliam

Expected behavior

Notes that begin with an setext header will register first line as the title and use it in the generated links.

Actual behavior

Only ATX header titles work see responsible line

The html output of files with the setext header title have the link in it, but it is not displayed, because the tag has no text content (which is supposed to be the note title). i.e. <a href="file:///home/pegasushyper/Documents/Notes/Note 2024-04-28T00.18.35.md"></a>

Steps to reproduce

  1. Create new note that uses setext header as title.
  2. Create another note that references it via the wiki-links script syntax (i.e. [[my-test-note]]).
  3. Then look at the preview of the "my-test-note" file and at the end you'll see the h2 "Backlinks" which is either followed by nothing at all (QON preview) or by an empty bullet point (when html is viewed in firefox).

Output from the debug section in the settings dialog

Irrelevant, because it has nothing to do with my machine, version, etc.; it's just not accounted for in the script.

Relevant log output in the Log panel

Nothing interesting, you just create/ change files.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions