Skip to content

Instantly share code, notes, and snippets.

@akrantz01
Last active August 11, 2020 18:14
Show Gist options
  • Save akrantz01/05a917f9dea75fb73d9991beddc58c84 to your computer and use it in GitHub Desktop.
Save akrantz01/05a917f9dea75fb73d9991beddc58c84 to your computer and use it in GitHub Desktop.
Example for docusaurus v2 issue
const links = [
{
label: "Map",
href: "<link>"
},
{
label: 'Discord',
href: '<link>',
},
]
module.exports = {
title: 'My Amazing Title',
tagline: 'My even better tagline',
url: 'https://example.com',
baseUrl: '/',
onBrokenLinks: 'throw',
favicon: 'img/favicon.ico',
organizationName: 'org',
projectName: 'project',
themeConfig: {
navbar: {
title: 'My Amazing title',
logo: {
alt: 'Logo',
src: 'img/logo.svg',
},
hideOnScroll: true,
items: links,
},
footer: {
style: 'dark',
links: [
{
title: 'Links',
items: links,
},
{
title: "Alex Krantz",
items: [
{
label: "Website",
href: "https://krantz.dev"
},
{
label: "GitHub",
href: "https://github.com/akrantz01"
}
]
}
],
copyright: `Copyright © ${new Date().getFullYear()} Alex Krantz.`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
routeBasePath: "/",
showLastUpdateTime: true,
},
},
],
],
};
Number Test Expected
1 &amp Preformatted text w/o rendered entity
2 & Preformatted text w/ rendered entity
3 test with backticks Preformatted text
4 test with backticks and entities &amp; &#124; Preformatted text w/o rendering the entity
5 test with HTML Preformatted text
6 test with HTML and entities & | Preformatted text w/ rendering the entity

When using the code tag in 2 and 6, they should both work in the same way. However, when there is any text other than the HTML entity, it does not display as preformatted text.

Expected:

expected

Actual:

actual

It seems that whenever any text other than a single HTML entitiy is added inside a code tag in the table, it fails to render properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment