Skip to content

v2.5.34

Compare
Choose a tag to compare
@ap0llo ap0llo released this 03 May 18:18

New Features

Bug Fixes

Details

Add option to include anchor tags in the output

Add MdSerializationOptions.HeadingAnchorStyle setting. If set to MdHeadingAnchorStyle.Tag, anchor tags for all headings will be included in the output.
By default no anchor tags are emitted (keeping current behavior)

Allow MdHeading.Anchor to be set

Make MdHeading.Anchor property settable. By default, property is initialized with auto-generated value (thus keeping previous behavior). In combination with the option to include anchor tags in the output, this allows customizing the names of anchors for linking within a page.

If MdHeading.Anchor is set to a null or whitespace value, no anchor tag is emittted, even if MdHeadingAnchorStyle is set to 'Tag'

Add public helper methods for generating Heading ids

Add HtmlUtilities.ToUrlSlug() method that exposes the logic to that is used to determine auto-generated ids/anchor for headings

Add methods to copy MdSerializationOptions instances

Add Clone() method to MdSerializationOptions that creates a copy of an otpions instance.
Cloning default instances (which are read-only) removes the read-only flag and returns a instance which's properties can be modified.

In addition to Clone() add the With() method to that allows specifiying a update action (as Action<MdSerializationOptions>) to apply to the copy.

Add MdHeadingAnchorStyle.Auto option

Add option MdHeadingAnchorStyle.Auto that allows to inlcude anchor tags in the output only if an anchor different from the auto-generated anchor was set.

Do not escape '/' when using the 'MkDocs' preset