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:
Justin DiRose 2020-04-21 10:12:56 -05:00 committed by GitHub
parent 62459c845f
commit c9cdd12e97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ export default {
}
const commands = postElements[0].querySelectorAll(
":scope > pre > code"
":scope > pre > code, :scope :not(article) > pre > code"
);
const post = helper.getModel();