Skip to content

Release 3.1.0 - #12

Merged
kampute merged 14 commits into
mainfrom
v3.1.0
Oct 13, 2026
Merged

kampute merged 14 commits into
mainfrom
v3.1.0

Conversation

@kampute

@kampute kampute commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Summary

Prepares release 3.1.0. Fixes the defects found by a review of the test suite, adds GitLab Wiki addressing on a new abstract base for Markdown targets, and compares generated URLs case-sensitively.

Changes

  • Fixes in metadata extraction, C# formatting, XML documentation processing, Markdown and HTML output, YAML front matter, and topic, path and URL handling, each committed with its tests.
  • New abstract MarkdownAddressingStrategy and MarkdownAddressingOptions; DevOpsWikiStrategy now derives from them without changing its behavior or public members.
  • New GitLabWikiStrategy, GitLabWikiOptions and DocumentationContextBuilder.GitLabWiki().
  • Relative URLs between generated pages are compared case-sensitively.
  • LF line endings for source files, updated test packages, README corrections, AGENTS.md, and the version bump to 3.1.0.

Compatibility

No public member was removed and no signature changed. YAML front matter with anchors, aliases or tags now throws FormatException instead of being read as plain strings.

.editorconfig requires LF for C# and XSLT files, but with '* text=auto'
alone, core.autocrlf=true checked them out with CRLF. Pin LF for C#, XSLT,
JSON and Markdown files in .gitattributes, apply the XSLT settings of
.editorconfig to JSON and Markdown files, and drop the Visual Basic entries,
as the repository has no Visual Basic files.
Update NUnit to 5.0.0, NUnit.Analyzers to 4.15.0, NUnit3TestAdapter to
6.3.1, Microsoft.NET.Test.Sdk to 18.10.1, Moq to 4.21.0 and
coverlet.collector to 10.1.0.
The renderer examples overrode Render with an IModel parameter, but the
parameter type of DocumentPageRenderer.Render is IDocumentModel.
Behavior changes:
- Overrides whose signatures use types constructed from a base type
  parameter (List<T>, T[], ref T, EventHandler<T>) were not matched to their
  base members; one AdapterHelper.IsSubstitutableBy, now public, serves
  parameters, properties, events and IsValidTypeSubstitution.
- An unrelated overload whose parameter types only satisfied the
  constraints of a base type parameter was matched as an override or
  interface implementation. Signatures are matched against the type
  arguments bound in the declaring type hierarchy, and each construction of
  an explicitly implemented interface is considered.
- The declaration scope ignored namespaces.
- Generic member definitions were missing for signatures with constructed
  types.
- IField.Type of a fixed-size buffer was always Int32[]; it is now an array
  of the element type (byte[] for 'fixed byte b[16]').
- Assemblies without a public key were reported as strongly named.
- 'where T : class' rejected interfaces, arrays and delegates.
- Nullable types loaded through a MetadataLoadContext were not decorated.
- Disposing a MetadataUniverse kept the cached metadata of its assemblies.
- Fallback assemblies from the AppDomain are loaded into the
  MetadataLoadContext.
- Enum values are read through EnumBits, so signed and unsigned underlying
  types compare correctly.

Documentation: remove the ArgumentException that CreateParameterMetadata
cannot throw.

Extend the metadata tests with missing boundaries, failure paths and
documented exceptions, and remove duplicate and non-discriminating tests.
Behavior changes:
- Enum values print correctly for signed and unsigned underlying types,
  including values with no matching member name.
- Non-finite float and double literals were formatted wrongly.
- Attribute qualifiers were formatted wrongly.

Add tests for these cases and for language lookup.
Behavior changes:
- <inheritdoc path="..."> filters the inherited member's documentation
  instead of selecting a member, and the member's own tags take precedence
  over inherited ones; distinct inherited tags for the same target, such as
  several exception conditions, are kept, and identical ones are copied once.
- <include> kept only the first selected element.
- Resolving a see-also hyperlink changed shared XML.
- Comments with only child elements counted as empty.
- Nested entries lost their context.
- html.xslt ignored topic URLs for <see href>.

Documentation: correct the HTML note examples.

Add tests for the XML documentation error handler, the context-aware
reference resolver and the XSLT tools, and make the mock reference resolver
resolve only relative topic references, like the real one.
Behavior changes:
- Link transformers rewrote link text and attribute names.
- WrappedTextWriter.WriteLine(string) ignored the wrapped writer's NewLine.
- MarkdownWriter escaped inline code and table cells wrongly, and a line
  starting with a number got a visible backslash.
- MarkdownMinifier keeps indented code blocks outside lists as written
  instead of collapsing their whitespace.
- Markdown.Decode removed a backslash before any character instead of only
  before ASCII punctuation; headings inside fenced code blocks were
  reported; heading text kept closing sequences and backslash escapes.
  IsAsciiPunctuation and TryParseCodeFence are now public.
- HtmlParsingHelper.TryExtractTagContent handles nested tags with the same
  name, and tag-like text in comments, quoted attribute values and raw text
  elements no longer counts as markup.
- NormalizeWhitespace could return its input unchanged when it should not.
- The pooled StringWriter returns its builder only on its first disposal.
- DocFormatter threw ArgumentException instead of the documented
  ArgumentNullException for a null file extension.

Documentation: document the lenient heading rule and correct the
MarkdownWriter example.

Add tests for the documentation composers, the file-system writer factory,
WrappedTextWriter and the formats.
Behavior changes:
- Anchors, aliases and tags were read as plain strings; they now throw
  FormatException.
- Flow sequences and mappings ([a, b], {a: 1}) written on a single line,
  nested or not, are parsed into lists and dictionaries.
- Apostrophes in plain scalars and key-aligned sequences were rejected, and
  block scalars and quoted keys were mangled.

Documentation: remove the exceptions Yaml.Parse cannot throw.
Behavior changes:
- DocumentationContextBuilder.AddTopic(id, path) recursed forever.
- FileTopicFactory swapped the topic identifier and path.
- TopicCollection kept removed topics in its path index, missed exact paths
  with dot segments and resolved partial identifiers case-sensitively.
- PatternCollection matched '*' without a separator.
- The file topic hierarchy builders skipped single-topic validation and
  nested index files, and the file name prefix hierarchy links a file to
  the nearest existing prefix when an intermediate file is missing.
- PathHelper.IsSubpath treats '/' and '\' as the same separator.
- UriHelper.Combine let '..' consume the host and dropped the base
  fragment, and query parameter names were not encoded.
- ToTitleCase and DotNetApiStrategy used culture-sensitive casing, so
  default topic titles and API paths depended on the machine.
- TryTransformText treated a null text as empty, and a null file path threw
  ArgumentException, instead of the documented ArgumentNullException.

Documentation: state that an unknown MainTopicId or ApiTopicId throws
ArgumentException, and align IReadOnlyPatternCollection.Contains with its
implementation.

Extend the tests of collections, topics, routing and the documentation
context, and add tests for RemoteApiDocUrlResolver.
Behavior changes:
- RelativeUrlContextManager compared URL path segments ignoring case, so a
  link from API/index.html to api/page.html was shortened to page.html,
  which resolves to API/page.html and breaks on case-sensitive hosts. URL
  paths are case-sensitive, so the comparison is now ordinal.
- FileTopicHelper.ConstructHierarchyByDirectory and
  ConstructHierarchyByIndexFile grouped files by directory case-sensitively
  while matching file and index names case-insensitively, so Docs/guides.md
  did not become the parent of docs/guides/intro.md. Directory grouping now
  ignores case like the rest of the matching.
MarkdownAddressingStrategy and MarkdownAddressingOptions hold the page
structure that DevOpsWikiStrategy used: namespace pages, type pages nested
under them, members addressed by the anchor of their heading, topic pages
named after their titles, and the optional main and API topics. Derived
classes define how a title becomes a page name and, when the target differs
from GitHub and GitLab, how a heading becomes an anchor.

DevOpsWikiStrategy and DevOpsWikiOptions now derive from them; their
behavior and public members are unchanged.

GitLabWikiStrategy addresses pages on a GitLab Wiki: spaces become hyphens,
angle brackets become braces, and characters not allowed in file names or
reserved in URLs become underscores. Member anchors follow GitLab's heading
anchor rules, implemented by the new Markdown.ToHeadingAnchor.
DocumentationContextBuilder.GitLabWiki creates a builder for it.
The README and welcome page listed Microsoft Docs and DocFx as supported
platforms, but the library only produces URLs compatible with their layouts.
Give coding agents the build and test commands, code conventions and
compatibility rules of the repository.
@kampute
kampute merged commit 8522ad5 into main Oct 13, 2026
1 check passed
@kampute
kampute deleted the v3.1.0 branch October 13, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants