CyCraft / starkdown

🦾 Tiny <3kb Markdown parser written, almost as fast and smart as Tony Stark

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add new MD syntax to make an anchor link with `target="_blank"`

mesqueeb opened this issue · comments

1

Make a PR towards Starkdown with a new automated test which fails.
The test should test a new syntax of Markdown with which you can make an anchor tag that will open a link in a new page.

Eg.
currently we test anchor tags:

expect(starkdown('[Example](#example)')).toEqual('<p><a href="#example">Example</a></p>')

We need a new markdown syntax that will output:

<p><a href="#example" target="_blank">Example</a></p>

The proposed syntax for adding target="_blank" can be anything you feel works well. Ideally we use a similar syntax to how other markdown flavours have solved this.

2

Implement a fix that will make the test succeed

commented

fixed in #3