DEV: uses innerHTML to decide if fast-edit is possible (#15760)

We don't need raw to decide if we can fast edit or not, we will fetch the raw later when we do the replacement, but this step can be done directly from innerHTML.
This commit is contained in:
Joffrey JAFFEUX 2022-02-01 11:58:04 +01:00 committed by GitHub
parent dad2e5e513
commit bb9015e811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,7 +194,7 @@ export default Component.extend(KeyEnterEscape, {
if (this._canEditPost) { if (this._canEditPost) {
const regexp = new RegExp(regexSafeStr(quoteState.buffer), "gi"); const regexp = new RegExp(regexSafeStr(quoteState.buffer), "gi");
const matches = postBody.match(regexp); const matches = cooked.innerHTML.match(regexp);
if ( if (
quoteState.buffer.length < 1 || quoteState.buffer.length < 1 ||