Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task
claremacrae opened this issue Sep 6, 2022 · 0 comments

Comments

@claremacrae
Copy link
Contributor

claremacrae commented Sep 6, 2022

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.

@claremacrae claremacrae changed the title Links to web pages and formatting are not rendered in tasks Links to web pages and formatting are not rendered in tasks when in Reading mode Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant