Pasted inline code (via Markdown-style backticks) renders hyperlinks incorrectly

Philipp Stemberger March 22, 2021

Hi!

One thing I like about Confluence is that I can paste in Markdown and it renders correctly (mostly). I know it's probably not an officially supported feature but I appreciate the effort. The one instance where it failed me is when I tried to put a hyperlink inside inline code. It generates and displays superfluous angle brackets. Example:

Some link inside some code : `https://do-not-click.com`.

This would render an open angle bracket before the h of http and after the inline code.

Is there maybe a nice workaround for that?

Cheers,
Philipp

1 answer

0 votes
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 22, 2021

Not sure what you mean by inline code, are you referring to the code macro? Or do you mean monospace format from the menu?

I know that later places HTML code tags around the content, so not sure hyperlinks are allowed.

Philipp Stemberger March 22, 2021

Hey Bill, thanks for your answer.

Sorry for being unclear. The problem occurs when trying to paste a code block (invoked with triple backtickets) and also when trying to paste text in monospace format (invoked with single backticks). For example, try pasting this as raw text into the editor:

Some regular text. `Some text in monospace format. Hyperlinks like https://something.com will have angle brackets around them`.

I understand why maybe it would be a bad idea to allow hyperlinks. The thing is, if you type the same text directly into the editor, it is displayed correctly (without angle brackets).

Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2021

It probably something in the new editor. From a best practices point of view, when I have a line of code, I use the code macro to offset it from the rest of the text. And when because of issues with formatted pasted content, I tend to paste it into something like Notepad++ to clean out any formatting.

My basic rule is to start with clean content, THEN use the format tools inside the editor. You will run in to fewer problems in the long run. IMHO.

Philipp Stemberger March 23, 2021

Thank you for your answer!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events