@@ -46,6 +46,7 @@ const kQuartoNbClass = "quarto-notebook";
4646const kQuartoCellContainerClass = "cell-container" ;
4747const kQuartoCellDecoratorClass = "cell-decorator" ;
4848
49+ // Post processes the notebook and adds 'notebook' style affordances
4950export function notebookViewPostProcessor ( ) {
5051 return ( doc : Document ) : Promise < HtmlPostProcessResult > => {
5152 doc . body . classList . add ( kQuartoNbClass ) ;
@@ -80,6 +81,7 @@ export function notebookViewPostProcessor() {
8081 } ;
8182}
8283
84+ // Processes embeds within an HTML page and emits notebook previews as apprpriate
8385export async function processNotebookEmbeds (
8486 doc : Document ,
8587 format : Format ,
@@ -98,6 +100,7 @@ export async function processNotebookEmbeds(
98100 let count = 1 ;
99101 const services = renderServices ( ) ;
100102
103+ // Emit links to the notebooks inline (where the embedded content is located)
101104 const linkedNotebooks : string [ ] = [ ] ;
102105 for ( const nbDivNode of notebookDivNodes ) {
103106 const nbDivEl = nbDivNode as Element ;
@@ -168,6 +171,7 @@ export async function processNotebookEmbeds(
168171 }
169172 }
170173
174+ // Emit global links to the notebooks
171175 if ( global ) {
172176 const containerEl = doc . createElement ( "div" ) ;
173177 containerEl . classList . add ( "quarto-alternate-notebooks" ) ;
@@ -248,6 +252,7 @@ function notebookViewConfig(
248252 } ;
249253}
250254
255+ // Renders an HTML preview of a notebook
251256async function renderHtmlView (
252257 path : string ,
253258 options : NotebookViewOptions ,
0 commit comments