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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/views/messages/TextualBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

node.tagName === "BLOCKQUOTE") {
continue;
}
else if (node.children && node.children.length) {
Expand Down