mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-24 14:36:59 +02:00
chore: upgrade Prettier + regenerate lock file (#5611)
* Bump deps * Run prettier * Format docs * Minor refactor * Collapse objects * Fix type * Update lock file
This commit is contained in:
parent
4dbc458a22
commit
3f1f8255a2
70 changed files with 1534 additions and 1517 deletions
|
@ -30,8 +30,8 @@ interface PluginOptions {
|
|||
|
||||
const createJSX = (node: Image, pathUrl: string) => {
|
||||
const jsxNode = node;
|
||||
((jsxNode as unknown) as Literal).type = 'jsx';
|
||||
((jsxNode as unknown) as Literal).value = `<img ${
|
||||
(jsxNode as unknown as Literal).type = 'jsx';
|
||||
(jsxNode as unknown as Literal).value = `<img ${
|
||||
node.alt ? `alt={"${escapeHtml(node.alt)}"} ` : ''
|
||||
}${
|
||||
node.url
|
||||
|
|
|
@ -68,8 +68,10 @@ function toAssetRequireNode({
|
|||
const children = stringifyContent(node);
|
||||
const title = node.title ? `title="${escapeHtml(node.title)}"` : '';
|
||||
|
||||
((node as unknown) as Literal).type = 'jsx';
|
||||
((node as unknown) as Literal).value = `<a target="_blank" href={${href}}${title}>${children}</a>`;
|
||||
(node as unknown as Literal).type = 'jsx';
|
||||
(
|
||||
node as unknown as Literal
|
||||
).value = `<a target="_blank" href={${href}}${title}>${children}</a>`;
|
||||
}
|
||||
|
||||
// If the link looks like an asset link, we'll link to the asset,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue