Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Don't show link preview when link is inside of a quote #762

Merged
merged 1 commit into from
Apr 12, 2017

Conversation

lieuwex
Copy link
Contributor

@lieuwex lieuwex commented Mar 18, 2017

Closes element-hq/element-web#3445. Thought this issue was a good one to start contributing :)

Signed-off-by: Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com>
@matrixbot
Copy link
Member

Can one of the admins verify this patch?

@@ -131,7 +131,8 @@ module.exports = React.createClass({
links.push(node);
}
}
else if (node.tagName === "PRE" || node.tagName === "CODE") {
else if (node.tagName === "PRE" || node.tagName === "CODE" ||
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought of using else if (["BLOCKQUOTE", "PRE", "CODE"].indexOf(node.tagName) > -1) { here since it's a bit shorter, but I guess it would take a pretty big hit in performance

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good decision

@lukebarnard1
Copy link
Contributor

The test failure is a Red Herring so LGTM

@lukebarnard1 lukebarnard1 merged commit 7ae13f5 into matrix-org:develop Apr 12, 2017
@lieuwex
Copy link
Contributor Author

lieuwex commented Apr 12, 2017

Thanks! 🎉

@lieuwex lieuwex deleted the hide-link-preview-quote branch April 12, 2017 15:59
martindale pushed a commit to FabricLabs/matrix-react-sdk that referenced this pull request Dec 8, 2018
Add repository type to package.json to make it valid
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants