DEV: `IMAGE_MARKDOWN_REGEX` import available in core (#847)
This commit is contained in:
parent
3533814870
commit
712a07c39b
|
@ -1,4 +1,4 @@
|
||||||
< 3.4.0.beta3-dev: ecf1bb49d737ea15308400f22f89d1d1e71d13d
|
< 3.4.0.beta3-dev: decf1bb49d737ea15308400f22f89d1d1e71d13d
|
||||||
< 3.4.0.beta1-dev: 9d887ad4ace8e33c3fe7dbb39237e882c08b4f0b
|
< 3.4.0.beta1-dev: 9d887ad4ace8e33c3fe7dbb39237e882c08b4f0b
|
||||||
< 3.3.0.beta5-dev: 4d8090002f6dcd8e34d41033606bf131fa221475
|
< 3.3.0.beta5-dev: 4d8090002f6dcd8e34d41033606bf131fa221475
|
||||||
< 3.3.0.beta2-dev: 61890b667c06299841ae88946f84a112f00060e1
|
< 3.3.0.beta2-dev: 61890b667c06299841ae88946f84a112f00060e1
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
import { escapeExpression } from "discourse/lib/utilities";
|
import { escapeExpression } from "discourse/lib/utilities";
|
||||||
|
|
||||||
export const IMAGE_MARKDOWN_REGEX =
|
|
||||||
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
|
|
||||||
|
|
||||||
export function jsonToHtml(json) {
|
export function jsonToHtml(json) {
|
||||||
if (json === null) {
|
if (json === null) {
|
||||||
return "null";
|
return "null";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { tracked } from "@glimmer/tracking";
|
import { tracked } from "@glimmer/tracking";
|
||||||
import Service, { inject as service } from "@ember/service";
|
import Service, { inject as service } from "@ember/service";
|
||||||
import { IMAGE_MARKDOWN_REGEX } from "../lib/utilities";
|
import { IMAGE_MARKDOWN_REGEX } from "discourse/lib/uploads";
|
||||||
|
|
||||||
export default class ImageCaptionPopup extends Service {
|
export default class ImageCaptionPopup extends Service {
|
||||||
@service composer;
|
@service composer;
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { extractError, popupAjaxError } from "discourse/lib/ajax-error";
|
import { extractError, popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
import { apiInitializer } from "discourse/lib/api";
|
import { apiInitializer } from "discourse/lib/api";
|
||||||
import { getUploadMarkdown, isImage } from "discourse/lib/uploads";
|
import {
|
||||||
|
getUploadMarkdown,
|
||||||
|
IMAGE_MARKDOWN_REGEX,
|
||||||
|
isImage,
|
||||||
|
} from "discourse/lib/uploads";
|
||||||
import I18n from "discourse-i18n";
|
import I18n from "discourse-i18n";
|
||||||
import { IMAGE_MARKDOWN_REGEX } from "../discourse/lib/utilities";
|
|
||||||
|
|
||||||
export default apiInitializer("1.25.0", (api) => {
|
export default apiInitializer("1.25.0", (api) => {
|
||||||
const buttonAttrs = {
|
const buttonAttrs = {
|
||||||
|
|
Loading…
Reference in New Issue