Version History
- Future 0.50.0
- 0.40.22
- 0.40.20
- 0.40.18
- 0.40.16
- 0.40.14
- 0.40.12
- 0.40.10
- 0.40.8
- 0.40.6
- 0.40.4
- 0.40.2
- 0.40.0
- 0.35.8
- 0.35.6
- 0.35.4
- 0.35.2
- 0.35.0
- 0.34.58
- 0.34.56
- 0.34.53
- 0.34.52
- 0.34.51
- 0.34.50
- 0.34.49
- 0.34.48
- 0.34.46
- 0.34.44
- 0.34.42
- 0.34.40
- 0.34.38
- 0.34.36
- 0.34.34
- 0.34.32
- 0.34.30
- 0.34.28
- 0.34.26
- 0.34.24
- 0.34.22
- 0.34.20
- 0.34.18
- 0.34.16
- 0.34.14
- 0.34.12
- 0.34.10
- 0.34.8
- 0.34.6
- 0.34.4
- 0.34.2
- 0.34.0
- 0.32.24
- 0.32.22
- 0.32.20
- 0.32.18
- 0.32.16
- 0.32.14
- 0.32.12
- 0.32.10
- 0.32.8
- 0.32.6
- 0.32.4
- 0.32.2
- 0.32.0
- 0.30.0
- Add: discourse for flexmark-java feature discussions
- Fix:
FormattingAppendabledeprecate all conditional formatting related methods and methods only needed because of convoluted output construction. - Deprecate: all conditional formatting methods in
FormattingAppendable - Break: make Java 8 minimum version and use JDK 8 for compilation
- Fix: Factor out BasedSequenceImpl functionality that does not depend on BasedSequence and can be applied to any CharSequence into its own CharSequence interface with default implementations.
- Add:
LineFormattingAppendableto extend and eventually replaceFormattingAppendable- provide same
append(...),line(),blankLine(),indent(),prefix(), etc. ofFormattingAppendablebut leading, trailing whitespace options, applied when current line is complete not during construction. - add
append(Collection<CharSequence>)for easy appending of child rendered results - no callback methods and convoluted logic implementing indentations during content construction since these can be easily applied to individual lines once they are generated.
- provide implement
List<CharSequence>interface for its content lines - provide
currentLine()for last content line which does not yet have an EOL - provide
currentLineIndex()asintfor the index of thecurrentLine()value, will be equal tosize()if the current line has no content, ie. end of output after previous line terminated with EOL. - provide
result()asCollection<CharSequence>where each char sequence represents a single line of output.
- provide same
- Add:
FlexmarkHtmlParseroptions:- Fix: #313, Ability to override tags processing in FlexmarkHtmlParser
-
EXT_TABLESconversion option not yet implemented.
- Fix: merge util tests from @James-Adam and fix bugs
- Fix: change to
MutableDataSet.set(DataKey<? extends T>, T)
-
Fix: #316, Github user extension incorrectly formats some text
- Add: test to make sure previous character to
@is notisUnicodeIdentifierPart(),-nor.
- Add: test to make sure previous character to
-
Add:
FlexmarkHtmlParseroptions:- Fix: #318, Ability to disable table caption in FlexmarkHtmlParser,
- Add:
TABLE_CAPTIONoption as a convenience alias forFormatter.FORMAT_TABLE_CAPTION. Add documentation to Extensions: Html To Markdown
- Add:
- Fix: #314, Ability to override character replacements map in FlexmarkHtmlParser,
- Add:
TYPOGRAPHIC_REPLACEMENT_MAPoption key taking aMap<String,String>, if not empty will be used instead of the bundled map. Any typographic characters or HTML entities missing from the map will be output without conversion. If you want to suppress a typographic so it is not output add""to its mapped value.
- Add:
- Fix: #317, FlexmarkHtmlParser outputs extra newline when converting nested <ol>, <ul> lists
- Fix: when rendering raw HTML for inline elements, have to escape contained special markdown characters.
- Add:
FOR_DOCUMENToption to use as document into which the generated Markdown will be inserted. This is to allow re-use matching references generated from HTML instead of new ones. EXT_INLINE_LINKandEXT_INLINE_IMAGEoption defaultLinkConversion.MARKDOWN_EXPLICIT, specifies type of link and image conversion to apply:NONE,MARKDOWN_EXPLICIT,MARKDOWN_REFERENCE,TEXT,HTML
- Fix: #318, Ability to disable table caption in FlexmarkHtmlParser,
-
Add: Remove reliance on YouTrack: IDEA-207453 and instead change resource file URL to path in
SpecReaderand add a message to all example tests with the file URL with:xxxwherexxxis the line number of the spec example in the file.This will print the source location of the test in the console. Clicking the link goes right to the spec source file and line of the failed test if Awesome Console plugin is installed.
-
Add:
EmbeddedAttributeProviderdocumentation and add it to the provider's list by default unlessHtmlRenderer.EMBEDDED_NODE_PROVIDERis set to false. Add attributes to nodes in the AST by inserting aEmbeddedAttributeProvider.EmbeddedNodeAttributesnode with the desired attributes. See: NodeInsertingPostProcessorSample.java for example. -
Add: document that
DocxRendereremoji with GitHub preferred is not able to download images, compilingImageUtilslibrary with Java 8 eliminates the problem. -
Add: resource file URL to
SpecReaderand add a message to all example tests with the file URL with:xxxwherexxxis the line number of the spec example in the file.This will print the source location of the test in the console. Clicking the link goes right to the spec source file and line of the failed test. Unfortunately this URL will only work in IntelliJ when JetBrains add this to console to handle such
file://URLs: YouTrack: IDEA-207453 -
Fix: #310, PR: Change URL of GitHub CDN thanks to benelog
-
Fix:
AsideExtensionoption keys to be dynamic data keys dependent on corresponding Parser block quote options for their defaults.⚠️ This can potentially break code relying on versions of the extension before0.40.18because parsing rules can change depending on which block quote options are changed from their default values.To ensure independent options for aside blocks and block quotes, set aside options explicitly. The following will set all aside options to default values, independent from block quote options:
.set(EXTEND_TO_BLANK_LINE, false) .set(IGNORE_BLANK_LINE, false) .set(ALLOW_LEADING_SPACE, true) .set(INTERRUPTS_PARAGRAPH, true) .set(INTERRUPTS_ITEM_PARAGRAPH, true) .set(WITH_LEAD_SPACES_INTERRUPTS_ITEM_PARAGRAPH, true) -
Deprecate:
Parser.BLOCK_QUOTE_TO_BLANK_LINE, use more mnemonicParser.BLOCK_QUOTE_EXTEND_TO_BLANK_LINE -
Deprecate:
CustomNodeandCustomBlock.BlockandNodeshould be used directly. The library aims to make no distinction between core and extension implementations, these classes add no useful information. -
Deprecate: BaseSequence had old named functions which were misleading and duplicated under proper names:
countChars()->countLeading()countCharsNot()->countLeadingNot()countCharsReversed()->countTrailing()countNotCharsReversed()->countTrailingNot()
First of all they only counted leading characters which the name did not imply. Second they were duplicated.
Add character counting functions:
countOfAny()countOfAnyNot()
-
Fix:
DefinitionExtensiondoes not correctly set the child parse column, causing list items to be expecting 1 extra space for child item recognition. -
Add:
ExtensionConversion.NONEto suppress any output from corresponding element -
Add:
FlexmarkHtmlParser.EXT_MATH, defaultExtensionConversion.HTML, for selecting<math>tag processing. For now onlyMARKDOWNdoes nothing useful. Later it will be used to convert math ml to GitLab math inline element.
- Fix:
EnumeratedReferenceExtensionwould process GitHub issue link text as enumerated reference. Now enumeratedreferencemust start with a non-digit character to be interpreted as enumerated reference. - Fix: Reference Text, Reference Id, Link Text and Image Alt Text child text was not trimmed in the AST causing the parent text range to be smaller than the contained children's text range.
- Add:
PdfConverterExtension.PROTECTION_POLICY, defaultnull. Set the protection policy for the generated PDF document.- Merge: #306, PR: Add password protection support, send appreciations to niksw7
- Add:
youtu.belink handling toYouTubeLinkExtension- Merge: #305, PR: add new youtube link style support to flexmark-ext-youtube-embedded for youtu.be/xyz(?t=123), send appreciations to jjYBdx4IL
- Fix:
AutolinkExtensionremoving leadingTypographicnodes when the first link occurs in text following the typographic node. - Add: PDF converter sample with non-latin character set rendering information.
- Fix: missing
simple_smileemoji cheat sheet shortcut
- Fix: #300, Typography extension breaks some auto links
- Add:
TypographicTextinterface to mark nodes which hold text which is replaced with typographic for rendering but treated as text for decoration processing. For nowAutolinkExtensionis the only one making use of it to prevent typographic smarts from breaking up a link and causing part of it to be left out of the URL.
- Fix: GitLab inline math parser to allow multi-line inline math elements
- Fix: #295, CoreNodeFormatter does not descend into children on Link nodes , more like
kludge,
Formatter.OPTIMIZED_INLINE_RENDERINGwhenfalseand not translating to always render children of link text.
- Fix: change
AttributeProviderFactoryextensions to eliminate duplicate registrations of factories. - Fix:
AttributesExtensionto assign attributes to explicit/refs links/images - Fix: #299, FlexmarkHtmlParser produces extra empty list item for eclosing </p> element
- Fix:
MarkdownTable.appendTable(FormattingAppendable)to setFormattingAppendable.ALLOW_LEADING_WHITESPACEso indentation prefix is not eliminated. - Fix:
FormattingAppendableImplto not skip pending spaces ifFormattingAppendable.ALLOW_LEADING_WHITESPACEis selected, these will be prefixed before indent. - Add:
FlexmarkHtmlParser.SKIP_LINKS, defaultfalse. When true links are converted to text part of the link. - Add:
DoNotAttributeDecorateinterface to be implemented by all text nodes which do not result in span-like rendering of their text, such asTypographicSmarts,TypographicQuotesandSoftLineBreakbut will erroneously create a break in the text and mess up attribute assignment to text spans. - Add:
AttributesExtension.WRAP_NON_ATTRIBUTE_TEXT, defaulttrue. Whenfalsedoes not wrap nodes marked asDoNotAttributeDecorateinTextBase. Whentrue, will allow intuitive attribute processing for text containingDoNotAttributeDecorateas single text span instead of one interrupted by the typographic smarts nodes. - Fix:
AttributesExtensionincorrectly parsed invalid empty sequences and absorbed the text instead of skipping it. ie.{},{ },{#}and{.} - Add:
AttributesExtension.USE_EMPTY_IMPLICIT_AS_SPAN_DELIMITER, defaultfalse. When set totruewill treat{#}or{.}, without embedded spaced, as start attribute span delimiter to mark start of attribute assignment to text between{.}or{#}and the matching attributes element.
- Fix: #295, CoreNodeFormatter does not descend into children on Link nodes
Link,LinkRef,ImageandImageRefnode formatter renderer now descends into child nodes during all formatting, not just translation formatting.
- Add:
Formatter.OPTIMIZED_INLINE_RENDERINGdefaultfalse. When set totruewill use previous rendering for links and images which appends the node characters without descending into child nodes.
- Fix: #294, BlankLine nodes within BlockQuote change in behaviour
- remove blank lines from AST for
BlockQuoteandAsideBlocknodes ifParser.BLANK_LINES_IN_ASTis not set.
- remove blank lines from AST for
- Fix: #292, 0.40.0: JUnit is in the compile scope
- remove unnecessary ast collecting visitor in
DocumentParser - add test scope to flexmark pom
- remove unnecessary ast collecting visitor in
- Fix: #293, YamlFrontMatterBlock rendered as markdown does not preserve nested lists
- Add:
YamlFrontMatterValuenode containing yaml value(s) inserted as children ofYamlFrontMatterNode - Fix: change stored key as
BasedSequenceinstead of string, can be retrieved asYamlFrontMatterNode.getKeySequence() - Add: code to return
List<String>from child nodes ofYamlFrontMatterNode - Fix: resolve offsets in
YamlFrontMatterNodeandYamlFrontMatterValuenodes.
- Add:
-
Fix: Java9+ Compatibility, IntelliJ Migration contained in migrate 0_35_x to 0_40_0.xml, to use:
- copy to IntelliJ application settings to
migrationssubdirectory - if you have the project which you want to migrate open, then close it
- open the project in IntelliJ Ultimate or Community
- update the flexmark-java dependency version to 0.40.0 (or later) and make sure the new library is downloaded/updated in the project.
- use menu
Refactor>Migrate... - select
migrate flexmark-java 0.35.x to 0.40.0 - press
Run - in the refactoring preview tool window that opens hit
Do Refactor
⚠️ In my projects, the IDE can miss some class migrations, especially on files which are not open. Re-running the migration tends to apply the migration. In cases where migration is not applied manual editing will be needed. In my projectsDocument,NodeandFormatterwere the problem classes:com.vladsch.flexmark.ast.Documenttocom.vladsch.flexmark.util.ast.Documentcom.vladsch.flexmark.ast.Nodetocom.vladsch.flexmark.util.ast.Nodecom.vladsch.flexmark.formatter.internal.Formattertocom.vladsch.flexmark.formatter.Formatter
⚠️ flexmark-docx-converterandflexmark-pdf-convertercannot be used with Java 9+ modules because the underlying libraries used have package load conflicts that will be resolved in a later release. - copy to IntelliJ application settings to
-
Fix: overlapping packages in different modules, change:
com.vladsch.flexmark.ast.AllNodesVisitortocom.vladsch.flexmark.util.ast.AllNodesVisitorcom.vladsch.flexmark.ast.BlankLinetocom.vladsch.flexmark.util.ast.BlankLinecom.vladsch.flexmark.ast.BlankLineContainertocom.vladsch.flexmark.util.ast.BlankLineContainercom.vladsch.flexmark.ast.Blocktocom.vladsch.flexmark.util.ast.Blockcom.vladsch.flexmark.ast.BlockContenttocom.vladsch.flexmark.util.ast.BlockContentcom.vladsch.flexmark.ast.BlockNodeVisitortocom.vladsch.flexmark.util.ast.BlockNodeVisitorcom.vladsch.flexmark.ast.Contenttocom.vladsch.flexmark.util.ast.Contentcom.vladsch.flexmark.ast.ContentNodetocom.vladsch.flexmark.util.ast.ContentNodecom.vladsch.flexmark.ast.CustomBlocktocom.vladsch.flexmark.util.ast.CustomBlockcom.vladsch.flexmark.ast.CustomNodetocom.vladsch.flexmark.util.ast.CustomNodecom.vladsch.flexmark.ast.DescendantNodeIterabletocom.vladsch.flexmark.util.ast.DescendantNodeIterablecom.vladsch.flexmark.ast.DescendantNodeIteratortocom.vladsch.flexmark.util.ast.DescendantNodeIteratorcom.vladsch.flexmark.ast.Nodetocom.vladsch.flexmark.util.ast.Nodecom.vladsch.flexmark.ast.Documenttocom.vladsch.flexmark.util.ast.Documentcom.vladsch.flexmark.ast.DoNotCollectTexttocom.vladsch.flexmark.util.ast.DoNotCollectTextcom.vladsch.flexmark.ast.DoNotDecoratetocom.vladsch.flexmark.util.ast.DoNotDecoratecom.vladsch.flexmark.ast.DoNotLinkDecoratetocom.vladsch.flexmark.util.ast.DoNotLinkDecoratecom.vladsch.flexmark.ast.KeepTrailingBlankLineContainertocom.vladsch.flexmark.util.ast.KeepTrailingBlankLineContainercom.vladsch.flexmark.ast.NodeAdaptedVisitortocom.vladsch.flexmark.util.ast.NodeAdaptedVisitorcom.vladsch.flexmark.ast.NodeAdaptingVisitHandlertocom.vladsch.flexmark.util.ast.NodeAdaptingVisitHandlercom.vladsch.flexmark.ast.NodeAdaptingVisitortocom.vladsch.flexmark.util.ast.NodeAdaptingVisitorcom.vladsch.flexmark.ast.NodeIterabletocom.vladsch.flexmark.util.ast.NodeIterablecom.vladsch.flexmark.ast.NodeIteratortocom.vladsch.flexmark.util.ast.NodeIteratorcom.vladsch.flexmark.ast.NodeRepositorytocom.vladsch.flexmark.util.ast.NodeRepositorycom.vladsch.flexmark.ast.NodeVisitortocom.vladsch.flexmark.util.ast.NodeVisitorcom.vladsch.flexmark.ast.NodeVisitorBasetocom.vladsch.flexmark.util.ast.NodeVisitorBasecom.vladsch.flexmark.ast.NonRenderingInlinetocom.vladsch.flexmark.util.ast.NonRenderingInlinecom.vladsch.flexmark.ast.Packagetocom.vladsch.flexmark.util.ast.Packagecom.vladsch.flexmark.ast.ReferenceNodetocom.vladsch.flexmark.util.ast.ReferenceNodecom.vladsch.flexmark.ast.ReferencingNodetocom.vladsch.flexmark.util.ast.ReferencingNodecom.vladsch.flexmark.ast.VisitHandlertocom.vladsch.flexmark.util.ast.VisitHandlercom.vladsch.flexmark.ast.Visitortocom.vladsch.flexmark.util.ast.Visitorcom.vladsch.flexmark.IParsetocom.vladsch.flexmark.util.IParsecom.vladsch.flexmark.IRendertocom.vladsch.flexmark.util.IRender
-
Fix: API classes under
internalpackage:-
flexmark:-
com.vladsch.flexmark.internal.inline.AsteriskDelimiterProcessortocom.vladsch.flexmark.parser.core.delimiter.AsteriskDelimiterProcessor -
com.vladsch.flexmark.internal.inline.EmphasisDelimiterProcessortocom.vladsch.flexmark.parser.core.delimiter.EmphasisDelimiterProcessor -
com.vladsch.flexmark.internal.Brackettocom.vladsch.flexmark.parser.core.delimiter.Bracket -
com.vladsch.flexmark.internal.Delimitertocom.vladsch.flexmark.parser.core.delimiter.Delimiter -
com.vladsch.flexmark.internal.ThematicBreakOptionstocom.vladsch.flexmark.internal.ThematicBreakParser.ThematicBreakOptions -
com.vladsch.flexmark.internal.HeadingOptionstocom.vladsch.flexmark.internal.HeadingParser.HeadingOptions -
com.vladsch.flexmark.internal.BlockParserTrackertocom.vladsch.flexmark.parser.block.BlockParserTracker -
com.vladsch.flexmark.internal.BlockQuoteParsertocom.vladsch.flexmark.parser.core.BlockQuoteParser -
com.vladsch.flexmark.internal.DocumentBlockParsertocom.vladsch.flexmark.parser.core.DocumentBlockParser -
com.vladsch.flexmark.internal.FencedCodeBlockParsertocom.vladsch.flexmark.parser.core.FencedCodeBlockParser -
com.vladsch.flexmark.internal.HeadingParsertocom.vladsch.flexmark.parser.core.HeadingParser -
com.vladsch.flexmark.internal.IndentedCodeBlockParsertocom.vladsch.flexmark.parser.core.IndentedCodeBlockParser -
com.vladsch.flexmark.internal.ListBlockParsertocom.vladsch.flexmark.parser.core.ListBlockParser -
com.vladsch.flexmark.internal.ListItemParsertocom.vladsch.flexmark.parser.core.ListItemParser -
com.vladsch.flexmark.internal.ParagraphParsertocom.vladsch.flexmark.parser.core.ParagraphParser -
com.vladsch.flexmark.internal.ThematicBreakParsertocom.vladsch.flexmark.parser.core.ThematicBreakParser -
com.vladsch.flexmark.internal.HtmlBlockParsertocom.vladsch.flexmark.parser.core.HtmlBlockParser -
com.vladsch.flexmark.internal.ReferencePreProcessorFactorytocom.vladsch.flexmark.parser.core.ReferencePreProcessorFactory -
com.vladsch.flexmark.internal.InlineParserImpltocom.vladsch.flexmark.parser.internal.InlineParserImpl -
com.vladsch.flexmark.internal.BlockStartImpltocom.vladsch.flexmark.parser.internal.BlockStartImpl -
com.vladsch.flexmark.internal.BlockContinueImpltocom.vladsch.flexmark.parser.internal.BlockContinueImpl -
com.vladsch.flexmark.internal.LinkRefProcessorDatatocom.vladsch.flexmark.parser.internal.LinkRefProcessorData -
com.vladsch.flexmark.internal.CommonmarkInlineParsertocom.vladsch.flexmark.parser.internal.CommonmarkInlineParser -
com.vladsch.flexmark.internal.MatchedBlockParserImpltocom.vladsch.flexmark.parser.internal.MatchedBlockParserImpl -
com.vladsch.flexmark.internal.PostProcessorManagertocom.vladsch.flexmark.parser.internal.PostProcessorManager -
com.vladsch.flexmark.internal.DocumentParsertocom.vladsch.flexmark.parser.internal.DocumentParser -
com.vladsch.flexmark.internal.HtmlDeepParsertocom.vladsch.flexmark.parser.internal.HtmlDeepParser -
resource
/com/vladsch/flexmark/internal/util/entities.propertiesto/com/vladsch/flexmark/util/html/entities.propertiesinflexmark-utilmodule
-
-
flexmark-docx-convertercom.vladsch.flexmark.docx.converter.internal.DocxRenderertocom.vladsch.flexmark.docx.converter.DocxRenderercom.vladsch.flexmark.docx.converter.internal.DocxRendererPhasetocom.vladsch.flexmark.docx.converter.DocxRendererPhasecom.vladsch.flexmark.docx.converter.internal.NodeDocxRendererHandlertocom.vladsch.flexmark.docx.converter.NodeDocxRendererHandlercom.vladsch.flexmark.docx.converter.internal.DocxRendererOptionstocom.vladsch.flexmark.docx.converter.DocxRendererOptions
-
flexmark-formattercom.vladsch.flexmark.formatter.internal.Formattertocom.vladsch.flexmark.formatter.Formattercom.vladsch.flexmark.formatter.internal.FormattingPhasetocom.vladsch.flexmark.formatter.FormattingPhasecom.vladsch.flexmark.formatter.internal.MarkdownWritertocom.vladsch.flexmark.formatter.MarkdownWritercom.vladsch.flexmark.formatter.internal.NodeFormattertocom.vladsch.flexmark.formatter.NodeFormattercom.vladsch.flexmark.formatter.internal.NodeFormatterContexttocom.vladsch.flexmark.formatter.NodeFormatterContextcom.vladsch.flexmark.formatter.internal.NodeFormatterFactorytocom.vladsch.flexmark.formatter.NodeFormatterFactorycom.vladsch.flexmark.formatter.internal.NodeFormattingHandlertocom.vladsch.flexmark.formatter.NodeFormattingHandlercom.vladsch.flexmark.formatter.internal.NodeRepositoryFormattertocom.vladsch.flexmark.formatter.NodeRepositoryFormattercom.vladsch.flexmark.formatter.internal.PhasedNodeFormattertocom.vladsch.flexmark.formatter.PhasedNodeFormattercom.vladsch.flexmark.formatter.internal.NodeFormatterSubContexttocom.vladsch.flexmark.formatter.NodeFormatterSubContext
-
- Fix: missing test scope on flexmark-test-utils
- Fix:
MarkdownTable.fillMissingColumns()would add empty columns not setting the proper source offset, causing laterMarkdownTable.addTrackedOffset(int)to fail - Fix: table extension parsing of table cells with inline elements containing table separator characters would parse correctly but not convert inlined table separators back to text, so these would not render.
- Add:
FlexmarkHtmlParser.SKIP_FENCED_CODE, defaultfalse. When enabled will convert fenced code to indented code in generated markdown. - Add:
FlexmarkHtmlParser.SKIP_CHAR_ESCAPE, defaultfalse. When enabled will not escape special characters.
- Add: html/ui helpers flexmark-util for use with Swing UI HTML generation
-
Fix: base64 encoding function in
ImageUtilsto remove\nfrom encoded string. -
Fix: Aside extension to use new
KeepTrailingBlankLineContainermarker for blocks which have a prefix which allows attribution of blank lines to the block. -
Add: sample for converting inline nodes to text nodes in node post processor. Thanks to @markkolich.
-
Fix:
ReplacedTextMappercan only handle a single replacement set, while AutoLinkExtension was applying a replacement on top of already replaced text.⚠️ Now any functions which perform replacements usingReplacedTextMapperneed to check if the passed in text mapperisModified()and if this is the case invokestartNestedReplacement(BasedSequence). -
Add: log4j logging to
DocumentParser, when debug is enabled parser will log resulting AST after parsing, paragraph pre-processing, block pre-processing and inline processing to isolate where a problem is introduced by an extension into the AST. -
Breaking:
⚠️ Potentially breaking change for some code if parsing withParser.BLANK_LINES_IN_ASTenabled. Last blank line of blocks is now moved out to the parent block. Greatest effect is on list items which previously held on to their last blank line, except for the last item in the list. Now all trailing blank lines are moved out to the parent list. Therefore children of lists can be list items or blank lines, not just list items. This makes blank line attribution more consistent. -
Fix: #287, ''flexmark-html-parser' The module has an mistake
-
Fix: empty table cells now contain a space so that the position of the cell's text in the file is not lost.
-
Fix: Formatter inline elements leaving embedded EOL sequences when
Formatter.KEEP_SOFT_LINE_BREAKSis false. -
Fix: trailing blank lines in block quotes are now left inside the block quote instead of moving them up to the document level if these blank lines are unambiguously attributable to the block quote by having a block quote prefix on the line. Unlike other block elements where a trailing blank line is not attributable to the block element, block quotes have explicit prefix which identifies the blank line as part of the block quote.
⚠️ trailing blank line nodes will be appended to the block quote even ifParser.BLANK_LINES_IN_ASTisfalseto force block quote to span the blank lines as the only way to extend the block quote enclosed characters.
- Test: navigation
- Next/Prev Tab
- Add: For next/prev tab table navigation in:
- separator stop at start and end of cell for editing
: - header/body stop at end of text to allow continued typing
- caption navigate to end of text like a cell
- separator stop at start and end of cell for editing
- Test:
addTrackOffset()for caption before/inside/after location.- Add:
isBeforeCaption(),isInsideCaption(),isAfterCaption()
- Add:
- Fix: change offset tracking to provide nullable
CharacterandisDeleted.true- deleted,false- inserted/typed. Character null - unknown, else character typed, inserted or deleted. Then all internal changes to what is needed will be isolated inside theMarkdownTableclass. - Add: table navigation helpers
- Fix:
TextCollectingVisitorto handle not just inline nodes but paragraphs and optionally other blocks. It now adds spaces between non-adjacent text nodes and adds a blank line between paragraphs. - Add:
TableTextCollectingVisitorwhich will extract the table text (without separator) and add a blank line after the table. - Add: inline parser will no longer process block nodes marked as
DoNotDecoratewith inline parser extensions to prevent undesired inline processing of nodes such as a table separator by typographic extension. - Add: table manipulation functions to
MarkdownTableto allow easy modification of a markdown table which can then be output as formatted markdown text. This class implements table formatting for the tables extension. - Add: to table formatter options:
FORMAT_TABLE_CAPTION_SPACES, defaultDiscretionaryText.AS_IS, how to handle spaces after[and before]in formatted output |FORMAT_TABLE_INDENT_PREFIX, default"", adds arbitrary prefix to tables in formatted output |FORMAT_TABLE_MANIPULATOR, defaultTableManipulator.NULL, interface invoked before table is appended to formatted output. Allows table manipulation |FORMAT_CHAR_WIDTH_PROVIDER, defaultCharWidthProvider.NULL, interface used to provide actual characters widths so table formatting can take these into account |
- Break: potentially breaking change, now FencedCode block with empty content returns
SubSequence.NULLfor content with no lines, previously returned empty string with start==end representing the position in the document where the content should have been. Affects onlyFencedCodeBlockandAsideBlock. Can useFencedCodeBlock.getOpeningMarker().getEndOffset() \+ 1if you need the position where the content would have been. Similarly forAsideBlock - Fix:
SegmentedSequencestart and end offsets to always be correct when contained segments are all non-based characters and computed on creation. - Break: some breaking changes to
FormattingAppendableImplderived constructors. Now most arguments must be passed, no defaults. It was getting too messy to trace which constructors were used and what were the resulting options for the appendable. - Fix: with
HtmlRenderer.FORMAT_FLAGSset toHtmlRenderer.PASS_THROUGHpre-formatted would incorrectly add indent spaces. - Fix: optimized HTML rendering with
HtmlRenderer.FORMAT_FLAGSset toHtmlRenderer.PASS_THROUGH, no fancy output formatting other than line breaks but 7x faster than using standard fancy formatting output. - Fix: Emoji shortcut did not render emoji with UNICODE_ONLY image type option
- Add:
Formatter.KEEP_HARD_LINE_BREAKS, default true andFormatter.KEEP_SOFT_LINE_BREAKSdefault true. Setting tofalsewill not output corresponding line break. - Add:
Formatter.APPEND_TRANSFERRED_REFERENCES, default false. Setting totruewill append all transferred references to the bottom of the formatted document. - Add:
NodeRepositoryAPI to return referenced references from a given node. - Fix: Jira and YouTrack converters ignored
HtmlRenderer.RECHECK_UNDEFINED_REFERENCES - Add: Base64 conversion to image utils
- Fix: possible index out of bounds on segmented sequences
- Add: HTML parser option to modify id attribute before output. Used to strip prefix
user-content-from GitHub rendered docs. SeeOUTPUT_ID_ATTRIBUTE_REGEX - Fix: HTML parser to transfer last
<a>withid/nameattribute to parent. - Fix: HTML parser to strip out
<a>tags withidattribute and no text when direct children of<body>. A kludge to strip out duplicate ids in GitHub rendered docs. - Fix: HTML parser to respect
<ol>startattribute for first list item. - Fix: HTML parser to add
*,~and^to escaped text characters so they don't generate erroneous markup. - Add: to TOC extension
CASE_SENSITIVE_TOC_TAGoption, defaulttrue, setting it to false allows[TOC]and[TOC]: #to be matched without case sensitivity. The syntax for toc options is still case sensitive.
- Fix: #274, FlexmarkHtmlParser can not handle escaped tags correctly, now
<,>and&are also escaped.
- Change: revert docx4j to 3.3.4 in docx4j-3 branch
- Fix: intermittent NPE when including macro with table in table
- Fix: intermittent NPE when including macro with table in table in docx4j-3 branch
- Add:
HtmlRenderer.NO_P_TAGS_USE_BR, defaultfalse. When enabled instead of wrapping loose paragraphs in<p>tag adds 2 x<br />after paragraph. - Fix: extension auto links would not be processed if paragraph had inline parser processed auto links before.
- Change: revert docx4j to 3.3.6 in docx4j-3 branch
- Add:
Macrosextension handling to docx converter. Macros allow nesting of block elements inside tables.
- Add:
flexmark-ext-macrosextension to allow macro definition and inclusion in inline contexts. Extensions: Macros - Fix:
Link.setTextChars(BasedSequence)was trimming the string before settingLink.text. Now the full untrimmed text is used.
- Fix: #271, Regression? Comments are preserved in 0.26.4 but removed in 0.34.40
- Fix: formatter HTML comments in non-translating mode did not output comment markers
- Fix: treat protocol prefix at the end of line as a valid link.
- Add: url parsing to
AutoLinkto set other link parts of the node like: pageref, anchor marker and anchor
- Fix: add
HtmlRenderer.HEADER_ID_GENERATOR_NON_ASCII_TO_LOWERCASE, defaulttrue. When set tofalsechanges the default header id generator to not convert non-ascii alphabetic characters to lowercase. Needed forGitHubid compatibility. - Fix: add
HtmlRenderer.HEADER_ID_GENERATOR_NON_ASCII_TO_LOWERCASEset tofalsetoGitHubandGitHubDocparser profiles.
- Fix: docx conversion of hyperlinks did not take relationship part into account when optimizing rel references causing invalid rel ids to be used if the same link was included in multiple contexts.
- Fix: docx conversion of footnote refs in tables to footnotes which contained links generated invalid docx.
- Change: docx4j library version to 6.0.1
- Fix: change anonymous classes to static classes in
CoreNodeDocxRenderer - Add: test case for
Parser.SPACE_IN_LINK_URLSto validate allowing spaces in URLs - Fix: Docx Converter to use style names instead of style ids because Word localizes ids and leaves the names common to all locales. Completely opposite to intuition but that is Word.
- Fix: Docx Converter remove hardcoded "CENTER" alignment for table headings overriding the
Table Headingstyle provided alignment.
- Fix: #268, Pipe characters are not escaped in Table (FlexmarkHtmlParser)
- Fix: escape pipe characters in text (to avoid accidental use as table or other markup) when not inline code nor fenced code
- Fix: escape back ticks when inside code
- Fix: disable escaping of
[]when inside code - Fix: disable escaping of
\when inside code - Fix: replace non-break space with space when inside code
- Fix:
FlexmarkHtmlParser.BR_AS_EXTRA_BLANK_LINESnow adds<br />followed by blank line - Add:
GitLabextension handling to docx converter. For nowmathandmermaidblocks are not converted. - Add:
GitLabextension formatter to properly handle block quote formatting - Add:
ParagraphContainerinterface to allow container nodes to control how their paragraphs are output for formatting/rendering with respect to blank line before/after control. - Fix:
GitLabblock quote parser bug for terminating sequence.
-
Add: html parser options to specify how to generate some markdown formatting elements, default for all is
ExtensionConversion.MARKDOWN:EXT_INLINE_STRONG- strongEXT_INLINE_EMPHASIS- emphasisEXT_INLINE_CODE- codeEXT_INLINE_DEL- delEXT_INLINE_INS- insEXT_INLINE_SUB- subEXT_INLINE_SUP- sup
Available settings:
ExtensionConversion.MARKDOWN- convert to markdownExtensionConversion.TEXT- convert to inner textExtensionConversion.HTML- leave HTML as is
Corresponding
SKIP_options have been deprecated since their function is duplicated by new options.
- Fix: Add
DoNotLinkDecoratetoCodefor preventing AutoLink extension from decorating inline code with autolinks. - Fix:
BasedSequenceImpl.lastIndexOfAny(CharSequence)andBasedSequenceImpl.lastIndexOfAnyNot(CharSequence)were usingindexOf...instead oflastIndexOf...
- Fix:
BasedSequenceImpl.countCharsReversed(char, int, int)andBasedSequenceImpl.countNotCharsReversed(char, int, int)to not return -1, should return 0 - Fix:
BasedSequenceImpl.spliceAtEnd()not to fail if this or other is empty - Add:
GitLabExtension, Documented in Gitlab Flavoured Markdown Extensions
- Add: OSGi module support thanks to @klcodanr
- Add: renderer type equivalences for allowing new renderer types which override existing ones.
Now "YOUTRACK" is defined as an override of "JIRA" by
YouTrackConverterExtension- use
HtmlRenderer.Builder.isRendererType(String)to test for recognizing renderer type instead ofrendererType.equals("...")make sure renderer type checking is done with most specific one, otherwise the wrong match will occur. For example, test for "YOUTRACK" before "JIRA" because "JIRA" matches "YOUTRACK". HtmlRenderer.isCompatibleRendererType(MutableDataHolder, String)HtmlRenderer.isCompatibleRendererType(MutableDataHolder, String, String)HtmlRenderer.addRenderTypeEquivalence(MutableDataHolder, String, String)add new to old renderer type mapping.
- use
- Add: html parser options to suppress generating some markdown formatting elements, default for
all is false:
SKIP_INLINE_STRONG- strongSKIP_INLINE_EMPHASIS- emphasisSKIP_INLINE_CODE- codeSKIP_INLINE_DEL- delSKIP_INLINE_INS- insSKIP_INLINE_SUB- subSKIP_INLINE_SUP- supSKIP_HEADING_1- heading 1SKIP_HEADING_2- heading 2SKIP_HEADING_3- heading 3SKIP_HEADING_4- heading 4SKIP_HEADING_5- heading 5SKIP_HEADING_6- heading 6SKIP_ATTRIBUTES- attribute extension formatting
- Add: html parser option
ADD_TRAILING_EOL, defaultfalse. Will add trailing EOL to generated markdown text. - Fix: html parser did not add a blank line before first list item of the first list
- Fix: #252, GfmUser and GfmIssue are not recognized if immediately followed by non-space character character, change regex to allow word break after user and issue
- Fix: merge #249, support Jira links titles thanks to @qwazer
- Fix: #247, Admonition Expression may lack a part of the text.
- Add:
TocExtension.TOC_CONTENT,TocExtension.TOC_LIST,SimTocExtension.TOC_CONTENT,SimTocExtension.TOC_LISTattributable parts fordivandul/olHTML tags. Documented in Table-of-Contents-Extension- Fix:
TOCelement to useTITLEoption if one is defined. Default forTOCis"", for simTOCit is"Table of Contents"
- Fix:
- Fix: #248, Request to add CSS class of TOC
- Add:
TocExtension.DIV_CLASSdefault"", class attribute to use on table of contentdivwrapper, duplicated asSimTocExtension.DIV_CLASS - Add:
TocExtension.LIST_CLASSdefault"", class attribute to use on table of contentulorolelement, duplicated asSimTocExtension.LIST_CLASS
- Add:
- Fix: #220, Jekyll Tag "include"
- Fix: #245, Markdown output of multiple Definition Lists has a problem that list items merge.
Blank lines were removed if
Parser.BLANK_LINES_IN_ASTisfalse
- Fix: #243, Markdown output of ImageRef syntax referencing ID is incorrect
- Fix: #244, Duplicate footnotes have the problem of HTML ID collision conflict. Now each
footnote reference adds a back references and the id of the back reference has
-#suffix added except for the first back-reference, where#is an integer from 1..N
- Add: media tags extension thanks to Cornelia Schultz (GitHub @CorneliaXaos)
- Change: convert class methods to static when possible
- Fix: #239, flexmark-ext-youtube-embedded missing test case for '@' usage.
- Fix: add ability to escape
@for youtube links.
- Fix: update nexus staging plugin to 1.6.7
- Fix: move nexus-staging plugin to deploy profile so it is not needed for ci test build
- Fix: gfm tables extension to only require a single separator dash
- Fix: for matched parenthesis destination link parsing, only treat backslash as escape if followed by characters which can be escaped.
- Fix: table formatter for translations to insert a space if the translated text is empty.
- Add: changed regex for parsing unquoted HTML attribute value to exclude
{}. - Add: translation formatting awareness to: abbreviation, admonition, attributes, emoji, enumerated reference footnotes and tables extensions
- Add: translation API sample: TranslationSample.java
- Fix:
AttributesExtensionincorrectly parsed consecutive attributes as a single element - Add:
TranslationHandlerFactoryto allow format options to be passed for custom handler creation. - Add:
RenderPurposearg toFormatter.translationRendereliminating the need for separate render purpose to be set in translation handler instance. - Add: Translation helper API to Formatter module. A bit of a kludge but has the potential to work. Preserves non-translatable entities, uses a single translation for all occurrences of text snippets such as ref text. Leaves inline emphasis in, Yandex has no issues with it. Replaces all element text which needs to be preserved with # where is unique integer. Will replace anchor refs to headings in file if the heading text is translated.
- Add: to html parser recognition that
<img alt="emoji category:shortcut" src="">is an emoji shortcut generated by flexmark-java emoji extension and convert it to such.
- Fix: #232, List continuation, add
Formatter.LIST_REMOVE_EMPTY_ITEMS, defaultfalse. Iftruethen empty list items or list items which only contain aBlankLinenode are removed from the output. - Fix: formatter output of empty list items
- Fix: formatter output of empty loose task list items
-
Fix: #229, gfm-tasklist extension - add state class to list item
- Add:
TaskListExtension.ITEM_DONE_CLASSandTaskListExtension.ITEM_NOT_DONE_CLASSlitag classes to use for done and not done items. - Add:
TaskListExtension.TIGHT_ITEM_CLASSto complement theTaskListExtension.LOOSE_ITEM_CLASSto replace generically namedTaskListExtension.ITEM_CLASS - Add: depreciation of
TaskListExtension.ITEM_CLASSin favour ofTaskListExtension.TIGHT_ITEM_CLASS
- Add:
-
Fix: merge #231, PR: Fix two small bugs in ext-toc @BlueBoxWare
-
Add:
TaskListAttributeProviderSampletoflexmark-java-samplesmodule. -
Add:
GitHubParsingSampletoflexmark-java-samplesmodule to show GitHub compatible parser setup. -
Add:
ParserEmulationProfile.GITHUBto reflect current GitHub profile, effectively it isParserEmulationProfile.COMMONMARK_0_28with GitHub compatible id generator settings. -
Fix: #221, XSS: Javascript execution through links, add
HtmlRenderer.SUPPRESSED_LINKSdefault"javascript:.*", a regular expression to suppress any links that match. The test occurs before the link is resolved using a link resolver. Therefore any link matching will be suppressed before it is resolved. Likewise, a link resolver returning a suppressed link will not be suppressed since this is up to the custom link resolver to handle.Suppressed links will render only the child nodes, effectively
[Something New](javascript:alert(1))will render as if it wasSomething New.Link suppression based on URL prefixes does not apply to HTML inline or block elements. Use HTML suppression options for this.
-
Add:
AutolinkExtension.IGNORE_LINKSdefault"", a regex expression to match link text which should not be auto-linked. This can include full urls likewww.google.comor parts by including wildcard match patterns. Any recognized auto-link which matches the expression will be rendered as text.
- Fix: change all javadoc/overview.html to be generated from javadoc/overview.md files.
- Fix: admonition.css remove non-existent
horiz-alignproperty. - Add: HtmlToMarkdownSample.java
- Add:
HtmlRenderer.HEADER_ID_GENERATOR_NON_DASH_CHARS, default"". Any characters in the string will be preserved and passed through to the heading ID. - Fix:
ParserEmulationProfile.GITHUB_DOCnow setsHtmlRenderer.HEADER_ID_GENERATOR_NO_DUPED_DASHESto" -"andHtmlRenderer.HEADER_ID_GENERATOR_NON_DASH_CHARSto"_"to match current GitHub heading id generation rules.
- Change:
AdmonitionExtension.WITH_LEAD_SPACES_INTERRUPTS_ITEM_PARAGRAPHtoAdmonitionExtension.WITH_SPACES_INTERRUPTS_ITEM_PARAGRAPH - Fix: Formatter for Tables now treats header column alignment as centered if no alignment marker is given for the column, body cells remain left aligned. This is default browser rendered table appearance.
- Fix: #213, Attributes element does not allow spaces before closing }
- Fix: update to open html to pdf 0.0.1-RC12
- Add:
DocxRenderer.TABLE_PREFERRED_WIDTH_PCTdefault0, if0then table width isauto, otherwise specifies percent of page width. - Add:
DocxRenderer.TABLE_LEFT_INDENTdefault120, in twips - Add:
DocxRenderer.TABLE_STYLEdefault"", if not empty then table then table style will be set to this value and default cell borders will not be generated.
- Add:
AdmonitionBlockgetters/setters fortitleOpeningMarker,title,titleClosingMarker - Fix:
AdmonitionNodeRendererremove erroneous, extra</div> - Add:
AdmonitionNodeRendererattributable parts:- ADMONITION_SVG_OBJECT_PART - svg object at top of body, part is on
Documentnode - ADMONITION_HEADING_PART - heading div
- ADMONITION_ICON_PART - heading icon svg
- ADMONITION_TITLE_PART - heading title span
- ADMONITION_BODY_PART - admonition body div
- ADMONITION_SVG_OBJECT_PART - svg object at top of body, part is on
- Add: Admonition Extension To create block-styled side content. For complete documentation please see the Admonition Extension, Material for MkDocs documentation.
-
Add:
DocxRenderer.PREFIX_WWW_LINKS, defaulttrue, when true addshttp://to link addresses which start withwww. -
Fix:
DocxRenderersome images would not be embedded and generate a CRC Error when loaded via URL vs file.
- Fix: #207, Issue extension doesn't support windows new lines, same for Gfm User extension.
-
Add:
EmojiExtension.ATTR_IMAGE_CLASS, default"", if not empty will set the image tag class attribute to this value. -
Fix: when image type was set to unicode then unicode char would be used for a shortcut even when that shortcut was not defined for requested shortcut type: github or ecs.
-
Fix: update to docx4j version 3.3.6
-
API Change: removed
EmojiCheatSheetclass to replace withEmojiShortcutswhich has better referencing for GitHub shortcuts and unicode chars for all emojis from emoji-cross-reference- Removed:
EmojiExtension.USE_IMAGE_URL - Add:
EmojiExtension.USE_SHORTCUT_TYPE, defaultEmojiShortcutType.EMOJI_CHEAT_SHEET, select type of shortcuts:EmojiShortcutType.EMOJI_CHEAT_SHEETEmojiShortcutType.GITHUBEmojiShortcutType.ANY_EMOJI_CHEAT_SHEET_PREFERREDuse any shortcut from any source. If image type options is notUNICODE_ONLY, will generate links to Emoji Cheat Sheet files or GitHub URL, with preference given to Emoji Cheat Sheet files.EmojiShortcutType.ANY_GITHUB_PREFERRED- use any shortcut from any source. If image type options is notUNICODE_ONLY, will generate links to Emoji Cheat Sheet files or GitHub URL, with preference given to GitHub URL.
- Add:
EmojiExtension.USE_IMAGE_TYPE, defaultEmojiImageType.IMAGE_ONLY, to select what type of images are allowed.EmojiImageType.IMAGE_ONLY, only use image linkEmojiImageType.UNICODE_ONLYconvert to unicode and if there is no unicode treat as invalid emoji shortcutEmojiImageType.UNICODE_FALLBACK_TO_IMAGEconvert to unicode and if no unicode use image.
- Removed:
-
API Change: removed
HtmlRenderer.WRAP_TIGHT_ITEM_PARAGRAPH_IN_SPAN, it was only needed to have somewhere to set attributes for tight item text forAttributeswhich now implement intelligent span wrapping of text. -
Change:
AttributesExtension.ASSIGN_TEXT_ATTRIBUTES, defaulttrue. Set tofalsefor backward compatibility.When
trueattribute assignment rules to nodes are changed to allow text elements to get attributes. If an attribute element is spaced from the previous plain text elementsome text {attributes}then attributes are for the parent of the text. If they are attached to the text elementsome text{attributes}then they are assigned to the immediately preceding plain text span. Within an inline element same rules apply:**bold text {attr}**are for the strong emphasis span, while**bold text{attr}**will wrap the text between the strong emphasis tags, in a span with given attributes.If a plain text span is interrupted by an HTML comment then it is considered as two separate plain text spans. ie.
some <!---->text{attr}will result insome <!----><span attr>text</span>rendering.Full spec: ext_attributes_ast_spec
-
Fix: Attributes, when they are first child then delete leading spaces of following node first rendered child will have leading spaces.
-
Add: Attribute syntax option allows
Attributeson reference definition so that all elements referencing it, inherit the attributes.To assign attributes to a reference definition you need to leave a blank line between the reference definition and the attributes element, placed by itself and followed by a blank line.
![reference 1][ref] ![reference 2][ref] [ref]: http://example.com/image.png {width=20 height=20} -
Fix: HTML Parser:
- image alt text should escape markdown special characters which can affect parsing of image
link text like:
[] - convert
<pre><tt>to indented code - add attribute extraction
- id : if
FlexmarkHtmlParser.OUTPUT_ATTRIBUTES_IDistrue, defaulttrue FlexmarkHtmlParser.OUTPUT_ATTRIBUTES_NAMES_REGEXdefault"", if not empty then will output attributes extension syntax for attribute names that are matched by the regex.
- id : if
- did not output a line end at start of
<div>, this tended to splice text in div to previous element.
- image alt text should escape markdown special characters which can affect parsing of image
link text like:
-
Add: Emoji Extension support to DocxRenderer.
- Add: Emoji Cheat Sheet images to resources in DocxRender jar, default configuration will resolve emoji image files to the files in the jar.
- Add:
DocxRenderer.DOC_EMOJI_IMAGE_VERT_OFFSET, default-0.1, vertical offset of emoji image as a factor of line height at point of insertion. The final value is rounded to nearest pt so jumps of 1 pt for small changes of this value can occur. - Add:
DocxRenderer.DOC_EMOJI_IMAGE_VERT_SIZE, default1.05, size of emoji image as a factor of line height at point of insertion.
-
Fix: #198, StringIndexOutOfBoundsException in
AbbreviationExtensionif abbreviation definition had an empty abbreviation. -
API Change: Refactoring of Interfaces to allow extensions only providing link resolver, attribute provider and html id generator to be re-used by the
DocxRendererandHtmlRendererwithout modifications other than changing theimplementedextension fromHtmlRenderer.HtmlRendererExtensiontoRendererExtension-
AttributesProviderFactorypass onlyLinkResolverContextinstead ofNodeRenderingContextto allow for attribute provider extensions to be re-used withDocxRender -
HeadIdGeneratorpass onlyLinkResolverContextinstead ofNodeRenderingContextto allow for header id generator provider extensions to be re-used withDocxRender -
new
RendererExtensionwith only ability to register html id generator, link resolver and attribute provider. Such an extension can be used as is withHtmlRendererandDocxRendererRendererExtension.extend(RendererBuilder, String)method of these gets passedRendererBuilderinstead ofHtmlRenderer.Builderextensions that implement both
RendererExtensionandHtmlRendererExtensionwill have only have the html renderer extensionextendmethod called.
-
-
Add:
flexmark-ext-asidehandling to DocxConverter -
Fix: DocxConverter formatting around footnote reference would be applied to footnote text
-
Add:
DocxRenderer.LOCAL_HYPERLINK_MISSING_HIGHLIGHT, default"red"to highlight in document hyperlinks with missing targets. Set to""to disable this. NOTE: must be one of the 8 named colors used by Word or it might complain. -
Add:
DocxRenderer.LOCAL_HYPERLINK_MISSING_FORMAT, default"Missing target id: #%s"to change the tooltip text of the missing hyperlink.%swill be replaced with the reference id of the link. -
Fix: DocxConverter self referencing ref anchors should be converted to bookmark references in the docx
-
Add: DocxConverter now supports
AttributesExtensionandEnumeratedReferenceExtensionby converting id attributes to bookmarks and enumerated reference links to hyperlinks to bookmarks. -
Change: Enumerated references which are missing the definition for their type now default to
type #where # is the reference ordinal instead of just#. -
Add: Enumerated links now have title set to the text value of the reference.
-
Add: DocxConverter options to control heading id generation to resolve anchor refs to document anchors
-
DocxRenderer.HTML_ID_GENERATOR, defaultHtmlIdGenerator instance, the id generator to use for generating heading ids. -
DocxRenderer.LOCAL_HYPERLINK_SUFFIX, default"", used to add a suffix to hyperlink bookmark names, except ones linking to first heading in a document. Only needed if you have some post processor on the docx adding suffixes to bookmark names.
-
For convenience these HtmlRenderer keys are aliased through DocxRenderer, keep in mind that
setting either will affect both keys. For information on these keys see
HtmlRenderer options
-
DocxRenderer.HEADER_ID_GENERATOR_RESOLVE_DUPES, defaulttrue, -
DocxRenderer.HEADER_ID_GENERATOR_TO_DASH_CHARS, default" -_" -
DocxRenderer.HEADER_ID_GENERATOR_NO_DUPED_DASHES, defaultfalse -
Add: DocxConverter options to re-map standard style names to user defined ones.
DocxRenderer.DEFAULT_STYLE, default "Normal"DocxRenderer.LOOSE_PARAGRAPH_STYLE, default "ParagraphTextBody"DocxRenderer.TIGHT_PARAGRAPH_STYLE, default "BodyText"DocxRenderer.PREFORMATTED_TEXT_STYLE, default "PreformattedText"DocxRenderer.BLOCK_QUOTE_STYLE, default "Quotations"DocxRenderer.ASIDE_BLOCK_STYLE, default "AsideBlock"DocxRenderer.HORIZONTAL_LINE_STYLE, default "HorizontalLine"DocxRenderer.TABLE_CAPTION, default "TableCaption"DocxRenderer.TABLE_CONTENTS, default "TableContents"DocxRenderer.TABLE_HEADING, default "TableHeading"DocxRenderer.FOOTNOTE_STYLE, default "Footnote"
DocxRenderer.BOLD_STYLE, default "StrongEmphasis"DocxRenderer.ITALIC_STYLE, default "Emphasis"DocxRenderer.STRIKE_THROUGH_STYLE, default "Strikethrough"DocxRenderer.SUBSCRIPT_STYLE, default "Subscript"DocxRenderer.SUPERSCRIPT_STYLE, default "Superscript"DocxRenderer.INS_STYLE, default "Underlined"DocxRenderer.INLINE_CODE_STYLE, default "SourceText"DocxRenderer.HYPERLINK_STYLE, default "Hyperlink"