|
|
|
@ -1,13 +1,12 @@
|
|
|
|
|
import React, { memo, useState, useEffect, Children } from 'react';
|
|
|
|
|
import { toKebabCase, isUrl } from '@vizality/util/string';
|
|
|
|
|
import { getModule, contextMenu } from '@vizality/webpack';
|
|
|
|
|
import { getMediaDimensions } from '@vizality/util/file';
|
|
|
|
|
import { toKebabCase, isUrl } from '@vizality/util/string';
|
|
|
|
|
import { open as openModal } from '@vizality/modal';
|
|
|
|
|
import { joinClassNames } from '@vizality/util/dom';
|
|
|
|
|
import { Regexes } from '@vizality/constants';
|
|
|
|
|
import { existsSync, promises } from 'fs';
|
|
|
|
|
import Markdown from 'react-markdown';
|
|
|
|
|
import { get } from '@vizality/http';
|
|
|
|
|
import gfm from 'remark-gfm';
|
|
|
|
|
|
|
|
|
|
import { CodeBlock, Icon, DeferredRender, Spinner, LazyImageZoomable, ImageModal, Anchor, ContextMenu } from '.';
|
|
|
|
@ -99,7 +98,7 @@ export default memo(({ source, git, type, addonId }) => {
|
|
|
|
|
</p>;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
ul: ({ ordered, start, children }) => {
|
|
|
|
|
ul: ({ _ordered, start, children }) => {
|
|
|
|
|
const attrs = {};
|
|
|
|
|
if (start !== null && start !== 1 && start !== undefined) {
|
|
|
|
|
attrs.start = start.toString();
|
|
|
|
@ -114,7 +113,7 @@ export default memo(({ source, git, type, addonId }) => {
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
ol: ({ ordered, start, children }) => {
|
|
|
|
|
ol: ({ _ordered, start, children }) => {
|
|
|
|
|
const attrs = {};
|
|
|
|
|
if (start !== null && start !== 1 && start !== undefined) {
|
|
|
|
|
attrs.start = start.toString();
|
|
|
|
@ -214,7 +213,7 @@ export default memo(({ source, git, type, addonId }) => {
|
|
|
|
|
setSize(dimensions);
|
|
|
|
|
}
|
|
|
|
|
getSrc();
|
|
|
|
|
}, [])
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<LazyImageZoomable
|
|
|
|
|