showdown icon indicating copy to clipboard operation
showdown copied to clipboard

nofollow link option

Open chk613 opened this issue 2 years ago • 2 comments

I would like all links in a section to be nofollow. I guess implementation would be similar to openLinksInNewWindow Is it possible to have it only set on a particular VueShowdown component or class?

chk613 avatar Dec 19 '21 08:12 chk613

I could see the how the universally set "nofollow" would work, but I'm not sure how you could mark a specific section to apply this attribute? Is this something that we would add to the markdown to denote a specific section?

SyntaxRules avatar Feb 08 '22 17:02 SyntaxRules

Out of the box, there's no way to define sections in markdown. You can, however, use HTML to define sections.

some text

<section markdown="1">
some text in section with [link](www.google.com)
</section>

other text

Regarding all links to be nofollow, that can be easily achieved using extensions. A simple output (or listener) extension should do the trick.

Regarding vuejs implementation, I'm not familiar with the library myself, so I don't know. But you can activate and deactivate extensions on the fly, so it should be possible to activate the nofollow extension only inside specific sections. But again, it depends on how vuejs calls showdown, which I'm not familiar with.

tivie avatar Feb 21 '22 19:02 tivie