mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 11:19:51 +00:00
FIX: Improve selector for copy codeblock button (#9493)
Previous selector implementation was not accounting for codeblocks in nested elements, like lists.
This commit is contained in:
parent
62459c845f
commit
c9cdd12e97
@ -114,7 +114,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const commands = postElements[0].querySelectorAll(
|
const commands = postElements[0].querySelectorAll(
|
||||||
":scope > pre > code"
|
":scope > pre > code, :scope :not(article) > pre > code"
|
||||||
);
|
);
|
||||||
|
|
||||||
const post = helper.getModel();
|
const post = helper.getModel();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user