| Author | DaveJarvis <email> |
|---|---|
| Date | 2022-10-18 23:40:42 GMT-0700 |
| Commit | ce8db8c8fe5e68ab4044a85e2dc7c169dcfa9ed5 |
| Parent | 977b5cf |
| Delta | 17 lines added, 3 lines removed, 14-line increase |
| import com.vladsch.flexmark.util.ast.IRender; | ||
| import com.vladsch.flexmark.util.ast.Node; | ||
| +import com.vladsch.flexmark.util.data.MutableDataSet; | ||
| import com.vladsch.flexmark.util.misc.Extension; | ||
| super( successor ); | ||
| - final var builder = Parser.builder(); | ||
| + final var options = new MutableDataSet(); | ||
| + options.set( HtmlRenderer.GENERATE_HEADER_ID, true ); | ||
| + options.set( HtmlRenderer.RENDER_HEADER_ID, true ); | ||
| + | ||
| + final var builder = Parser.builder( options ); | ||
| final var extensions = createExtensions( context ); | ||
| + | ||
| mParser = builder.extensions( extensions ).build(); | ||
| - mRenderer = HtmlRenderer.builder().extensions( extensions ).build(); | ||
| + mRenderer = HtmlRenderer | ||
| + .builder( options ) | ||
| + .extensions( extensions ) | ||
| + .build(); | ||
| } | ||
| package com.keenwrite.processors.markdown; | ||
| +import com.keenwrite.ExportFormat; | ||
| import com.keenwrite.io.MediaType; | ||
| import com.keenwrite.processors.Processor; | ||
| extensions.add( TeXExtension.create( processor, context ) ); | ||
| extensions.add( FencedBlockExtension.create( processor, evaluator, context ) ); | ||
| - extensions.add( CaretExtension.create( context ) ); | ||
| + | ||
| + if( context.isExportFormat( ExportFormat.NONE ) ) { | ||
| + extensions.add( CaretExtension.create( context ) ); | ||
| + } | ||
| + | ||
| extensions.add( DocumentOutlineExtension.create( processor ) ); | ||
| return extensions; | ||