Heatmap Calendar - Section with blankspace

What I’m trying to do

Hi, recently I’ve discovered this plugin and I’ve tried to link this popup to a section from my notes. And it works**

content: await dv.span([](${page.file.name+"#SectionName"})),

The problem appears once I try to link this to a section that has blankspaces like this:

content: await dv.span([](${page.file.name+"#⭐ Section Name"})),

And I would like to know if it is possible to do that.

Thanks in advance!

Things I have tried

I’ve tried to do it without spaces, even with the icon but with no spaces, and it works perfectly. But I would like to know if it’s possible to include that space.

Try adding angular brackets around your link, that’s is < and >. Alternatively try replacing the spaces with %20.

Thank you! I’m not sure if I’ve write right the angular brackets but the %20 works really fine. Just to know, would you mind to type me how should look this code with the angular brackets?

content: await dv.span([](${page.file.name+“#:star: Section Name”})),

Thank you for the solution!

I’m not quite sure about your surrounding code, but one variant would be similar to the example below:

await dv.span(`[](<${page.file.name}#⭐ Section Name>`))

It seems like you’ve omitted parts of the code, but I’ve seen some use this format for links: [display text](<url potentially with spaces>). I’m not quite sure handles this variant, but I think it should work that way too. That is with text (not non-charaters) replaced with someone meaningful.

1 Like

Thanks for all the help ^^

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.