Baptistou
Baptistou

Reputation: 2121

How to insert a line break in a markdown hyperlink with GitHub Wiki?

The following works :

[abc <br> def](test.md)

Because of this issue I need to use MediaWiki hyperlink syntax, however the following does not work.

[[abc <br> def | test]]

Is there a solution ?

enter image description here enter image description here

Upvotes: 1

Views: 962

Answers (3)

Bandantonio
Bandantonio

Reputation: 927

Hierarchy:

- Home Page
- Test page

Home page:

## Title

[test<br />page](Test-page)

Test page:

## Test page

[Back to home page](Home)

Custom sidebar:

* [Hello<br />page](Home)
* [test<br />page](Test-page)

Everything works smoothly except for the preview but as a link points to a specific page name without the extension (.md) and relative paths (./ or ../), these links will always work, you don't even need to preview them.

Upvotes: 1

Bandantonio
Bandantonio

Reputation: 927

It seems like the only way to work around your specific case with Markdown Edit mode is to use syntax like this:

[abc <br> def](wiki/test.md)

Pay attention that the link doesn't work in preview mode. After saving the page the link will work correctly.

Upvotes: 0

Bandantonio
Bandantonio

Reputation: 927

MediaWiki has inverted syntax for links, so this will work:

[[link to page | Link<br>text]]

Upvotes: 0

Related Questions