Skip to content

Hyperlinks rendered as cards - can the link type be set in config? #28

@JustinBusschau

Description

@JustinBusschau

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))

What I'd like to see:
Screenshot 2024-03-13 at 09 10 37

What I actually see:
Screenshot 2024-03-13 at 09 15 32

I think the solution lies in changing this code:

/**
* 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions