| 83 | 83 | implementation "com.fasterxml.jackson.core:jackson-annotations:${v_jackson}" |
| 84 | 84 | implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${v_jackson}" |
| 85 | implementation 'org.yaml:snakeyaml:1.30' | |
| 85 | implementation 'org.yaml:snakeyaml:1.33' | |
| 86 | 86 | |
| 87 | 87 | // HTML parsing and rendering |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | public boolean isExportFormat( final ExportFormat exportFormat ) { | |
| 71 | return mMutator.mExportFormat == exportFormat; | |
| 72 | } | |
| 73 | ||
| 70 | 74 | /** |
| 71 | 75 | * Responsible for populating the instance variables required by the |
| ... | ||
| 211 | 215 | assert autoClean != null; |
| 212 | 216 | mAutoClean = autoClean; |
| 217 | } | |
| 218 | ||
| 219 | private boolean isExportFormat( final ExportFormat format ) { | |
| 220 | return mExportFormat == format; | |
| 213 | 221 | } |
| 214 | 222 | } |
| 16 | 16 | import com.vladsch.flexmark.util.ast.IRender; |
| 17 | 17 | import com.vladsch.flexmark.util.ast.Node; |
| 18 | import com.vladsch.flexmark.util.data.MutableDataSet; | |
| 18 | 19 | import com.vladsch.flexmark.util.misc.Extension; |
| 19 | 20 | |
| ... | ||
| 35 | 36 | super( successor ); |
| 36 | 37 | |
| 37 | final var builder = Parser.builder(); | |
| 38 | final var options = new MutableDataSet(); | |
| 39 | options.set( HtmlRenderer.GENERATE_HEADER_ID, true ); | |
| 40 | options.set( HtmlRenderer.RENDER_HEADER_ID, true ); | |
| 41 | ||
| 42 | final var builder = Parser.builder( options ); | |
| 38 | 43 | final var extensions = createExtensions( context ); |
| 44 | ||
| 39 | 45 | mParser = builder.extensions( extensions ).build(); |
| 40 | mRenderer = HtmlRenderer.builder().extensions( extensions ).build(); | |
| 46 | mRenderer = HtmlRenderer | |
| 47 | .builder( options ) | |
| 48 | .extensions( extensions ) | |
| 49 | .build(); | |
| 41 | 50 | } |
| 42 | 51 | |
| 2 | 2 | package com.keenwrite.processors.markdown; |
| 3 | 3 | |
| 4 | import com.keenwrite.ExportFormat; | |
| 4 | 5 | import com.keenwrite.io.MediaType; |
| 5 | 6 | import com.keenwrite.processors.Processor; |
| ... | ||
| 78 | 79 | extensions.add( TeXExtension.create( processor, context ) ); |
| 79 | 80 | extensions.add( FencedBlockExtension.create( processor, evaluator, context ) ); |
| 80 | extensions.add( CaretExtension.create( context ) ); | |
| 81 | ||
| 82 | if( context.isExportFormat( ExportFormat.NONE ) ) { | |
| 83 | extensions.add( CaretExtension.create( context ) ); | |
| 84 | } | |
| 85 | ||
| 81 | 86 | extensions.add( DocumentOutlineExtension.create( processor ) ); |
| 82 | 87 | return extensions; |