Skip to content

Commit

Permalink
Fix markdown rendering logic
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Sep 23, 2024
1 parent 47f3f0a commit ebc074f
Show file tree
Hide file tree
Showing 6 changed files with 1,885 additions and 911 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ ui-tests/playwright-report
ui-tests/test-results
ui-tests/benchmark-results
ui-tests/jlab_root

.yarn
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"prettier": "^1.19.0",
"rimraf": "^3.0.2",
"shell-quote": "^1.7.2",
"typescript": "~4.1.3"
"typescript": "~5"
}
}
3 changes: 3 additions & 0 deletions packages/voila/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
"@jupyter-widgets/jupyterlab-manager": "^5.0.8",
"@jupyterlab/application": "^3 || ^4",
"@jupyterlab/apputils": "^3 || ^4",
"@jupyterlab/codemirror": "^3 || ^4",
"@jupyterlab/coreutils": "^5 || ^6",
"@jupyterlab/docregistry": "^3 || ^4 || ^5",
"@jupyterlab/javascript-extension": "^3 || ^4",
"@jupyterlab/markedparser-extension": "^4",
"@jupyterlab/mathjax2-extension": "^4",
"@jupyterlab/notebook": "^3 || ^4",
"@jupyterlab/outputarea": "^3 || ^4",
"@jupyterlab/rendermime": "^3 || ^4",
Expand Down
8 changes: 8 additions & 0 deletions packages/voila/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ export {
standardRendererFactories
} from '@jupyterlab/rendermime';

export {
EditorLanguageRegistry
} from '@jupyterlab/codemirror';

export { MathJaxTypesetter } from '@jupyterlab/mathjax2-extension';

export { createMarkdownParser } from '@jupyterlab/markedparser-extension';

export { extendedRendererFactories } from './rendermime';
export { WidgetManager } from './manager';
export { connectKernel } from './kernel';
Expand Down
6 changes: 5 additions & 1 deletion share/jupyter/voila/templates/base/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ require([window.voila_js_url || 'static/voila'], function(voila) {
saveState: false
};

const languages = new voila.EditorLanguageRegistry();

const rendermime = new voila.RenderMimeRegistry({
initialFactories: voila.extendedRendererFactories
initialFactories: voila.extendedRendererFactories,
latexTypesetter: new voila.MathJaxTypesetter(),
markdownParser: voila.createMarkdownParser(languages)
});

var widgetManager = new voila.WidgetManager(context, rendermime, settings);
Expand Down
Loading

0 comments on commit ebc074f

Please sign in to comment.