0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00

DEV: apply prettier to wizard composer editor

Dieser Commit ist enthalten in:
Angus McLeod 2022-08-22 16:10:01 +02:00
Ursprung d6b4954ae3
Commit b3bcaa26f1

Datei anzeigen

@ -13,8 +13,7 @@ import Site from "discourse/models/site";
import { uploadIcon } from "discourse/lib/uploads"; import { uploadIcon } from "discourse/lib/uploads";
import { dasherize } from "@ember/string"; import { dasherize } from "@ember/string";
const IMAGE_MARKDOWN_REGEX = const IMAGE_MARKDOWN_REGEX = /!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
export default ComposerEditor.extend({ export default ComposerEditor.extend({
classNameBindings: ["fieldClass"], classNameBindings: ["fieldClass"],
@ -133,8 +132,9 @@ export default ComposerEditor.extend({
event.target.closest(".button-wrapper").dataset.imageIndex, event.target.closest(".button-wrapper").dataset.imageIndex,
10 10
); );
const matchingPlaceholder = const matchingPlaceholder = this.get("composer.reply").match(
this.get("composer.reply").match(IMAGE_MARKDOWN_REGEX); IMAGE_MARKDOWN_REGEX
);
this.session.set("wizardEventFieldId", this.field.id); this.session.set("wizardEventFieldId", this.field.id);
this.appEvents.trigger( this.appEvents.trigger(