Skip to content

Links to web pages and formatting are not rendered in tasks when in Reading mode #20

Open
@claremacrae

Description

@claremacrae

Expected Behavior

All Markdown in task lines is rendered in Reading mode.

Current Behavior

Only task lines that contain both [[ and ]] are rendered in Reading mode.

Steps to Reproduce

Create the following tasks

- [ ] I link to [[README]]
- [ ] I link to a web page [BBC](https://www.bbc.co.uk)
- [ ] I have some **formatting** and *more formatting*

View them in Reading mode the original Tasks plugin and you see:

image

View them in Reading mode in Tasks-x and you see:

image

Context (Environment)

  • Obsidian version: 0.15.9
  • Tasks-s version: 2.7.0
  • I have tried it with all other plugins disabled and the error still occurs I am using the plugins that are enabled in the tasks-x vault, as downloaded from the 2.7.0 release page.

Possible Solution

I was prompted to test this out after reading this code:

// If there is no links then just set span to text, saves a ms or so per item.
if (taskAsString.indexOf('[[') != -1 && taskAsString.indexOf(']]') != -1) {
await MarkdownRenderer.renderMarkdown(taskAsString, textSpan, this.path, null as unknown as Component);
} else {
textSpan.textContent = taskAsString;
}

It looks to me like it makes the assumption that only wiki links need to be rendered, which is consistent with the behaviour noted above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions