-
Notifications
You must be signed in to change notification settings - Fork 7
Description
confluence-docs-as-code/test/fixtures/markdown/full.md
Lines 89 to 90 in 7be6031
| What happens [if link description contains | |
| a line break](other-page.md)? |
When the above is rendered in MD, we get hyperlinked text, broken over two lines, like so:
What happens if link description contains
a line break?
On Confluence, however, this is rendered something like:
What happens 📄Other Page
(i.e. the link text is taken from the page title of the page being linked to, and the page emoji is inserted as well)
You can edit this on Confluence directly and change the link from a card- type link to a more standard hyperlink by setting the "Display text" but you then lose the line break. Losing the line break isn't a deal breaker, but not being able to create standard hyperlinks is a problem.
An example of a line of markdown from one of my documents:
Fast Moving Consumer Goods ([FMCG](https://org.atlassian.net/wiki/spaces/Space/pages/1234567890))
I think the solution lies in changing this code:
confluence-docs-as-code/lib/plugins/link.js
Lines 65 to 73 in 7be6031
| /** | |
| * Opening markup for confluence link | |
| * | |
| * @param {string} title - Page title | |
| * @returns {string} Html markup | |
| */ | |
| function confluenceLinkOpen(title) { | |
| return `<ac:link ac:card-appearance="inline"><ri:page ri:content-title="${title}" /><ac:link-body>`; | |
| } |
but I don't know Confluence well enough to know what should be changed?

