mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 18:32:52 +02:00
feat(theme-classic): extensible code block magic comment system (#7178)
This commit is contained in:
parent
785fed723f
commit
51815c12c9
14 changed files with 692 additions and 161 deletions
|
@ -378,6 +378,17 @@ const config = {
|
|||
// TODO after we have forked prism-react-renderer, we should tweak the
|
||||
// import order and fix it there
|
||||
additionalLanguages: ['java', 'markdown', 'latex'],
|
||||
magicComments: [
|
||||
{
|
||||
className: 'theme-code-block-highlighted-line',
|
||||
line: 'highlight-next-line',
|
||||
block: {start: 'highlight-start', end: 'highlight-end'},
|
||||
},
|
||||
{
|
||||
className: 'code-block-error-line',
|
||||
line: 'This will error',
|
||||
},
|
||||
],
|
||||
},
|
||||
image: 'img/docusaurus-soc.png',
|
||||
// metadata: [{name: 'twitter:card', content: 'summary'}],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue