Skip to content

Use neutral markdown profile naming#1683

Merged
PrzemyslawKlys merged 2 commits intomasterfrom
codex/markdown-neutral-reader-profiles
Mar 11, 2026
Merged

Use neutral markdown profile naming#1683
PrzemyslawKlys merged 2 commits intomasterfrom
codex/markdown-neutral-reader-profiles

Conversation

@PrzemyslawKlys
Copy link
Member

Summary

  • replace public Markdig-branded reader/preset names with neutral portable-profile names
  • update README and compatibility docs to describe portability instead of a competitor-specific mode
  • keep Markdig references only in internal parity tests

Validation

  • dotnet restore OfficeIMO.Tests/OfficeIMO.Tests.csproj
  • dotnet restore OfficeIMO.Markdown/OfficeIMO.Markdown.csproj
  • dotnet test OfficeIMO.Tests/OfficeIMO.Tests.csproj --framework net8.0 --filter "FullyQualifiedNameMarkdown_Reader_Autolinks_Tests|FullyQualifiedNameMarkdown_ChatStyle_Tests|FullyQualifiedNameMarkdown_Renderer_Tests|FullyQualifiedNameMarkdown_Reader_Markdig_Parity_Tests" --no-restore
  • dotnet build OfficeIMO.Markdown/OfficeIMO.Markdown.csproj -c Release -f netstandard2.0 --no-restore
  • dotnet build OfficeIMO.MarkdownRenderer/OfficeIMO.MarkdownRenderer.csproj -c Release --no-restore

@claude
Copy link

claude bot commented Mar 11, 2026

Claude finished @PrzemyslawKlys's task —— View job


Pull Request Review

Reviewing PR #1683: "Use neutral markdown profile naming"

Todo List:

  • Read and analyze changed files
  • Review naming consistency across the codebase
  • Check documentation updates for accuracy
  • Evaluate test coverage and changes
  • Assess potential breaking changes
  • Provide comprehensive feedback

Review Feedback

This PR successfully removes Markdig-specific branding from public APIs and documentation while maintaining internal test references for compatibility testing. Here's my detailed analysis:

Code Quality & Best Practices

Excellent naming refactor:

  • MarkdownReaderOptions.CreateMarkdigParityProfile()CreatePortableProfile() - Much better public API naming
  • All public documentation updated consistently to use "portable profile" terminology
  • Internal test methods appropriately retain Markdig references for parity testing

Strong API design:

  • The CreatePortableProfile() factory method is well-documented with clear intent
  • Method signature and behavior remain identical - only naming changed
  • Proper XML documentation explaining the portable profile's behavior

Documentation Quality

README.md updates (OfficeIMO.Markdown/README.md:46):

  • Clear positioning: "Use the default mode for OfficeIMO/GitHub-like behavior and MarkdownReaderOptions.CreatePortableProfile() when stricter, more portable reader behavior matters"
  • Good examples showing both usage patterns

COMPATIBILITY.md updates:

  • Well-structured explanation of portable profile vs default behavior
  • Clear guidance on when to use portable profile for "portability-sensitive ingestion"

Breaking Changes Assessment

This is a breaking change but well-justified:

  • Breaking: CreateMarkdigParityProfile() method removed
  • Migration path: Replace with CreatePortableProfile() - identical behavior
  • Justification: Removes competitor branding from public API
  • Impact: Low - this appears to be a newer API based on recent commits

Test Coverage

Comprehensive test strategy:

  • Parity tests (Markdown_Reader_Markdig_Parity_Tests.cs) retain Markdig references appropriately
  • PortableProfileCases() test method covers the new portable profile behavior
  • Test method names updated to reflect new terminology
  • All test functionality preserved

Performance Considerations

No performance impact - this is purely a naming/branding change with identical implementation.

Security Considerations

No security implications. The security-focused reader options (like disabling autolinks, callouts, task lists) remain identical in behavior.

Implementation Details

MarkdownRendererPresets.cs changes (OfficeIMO.MarkdownRenderer/MarkdownRendererPresets.cs:10-13):

  • Clean abstraction with portableProfile parameter
  • Proper conditional logic: portableProfile ? MarkdownReaderOptions.CreatePortableProfile() : new MarkdownReaderOptions()
  • Good separation between regular and portable chat presets

Version update:

  • Appropriate minor version bump to 0.5.12 in project file

📝 Minor Suggestions

  1. Consider adding obsolete attribute for smoother migration:

    [Obsolete("Use CreatePortableProfile() instead", true)]
    public static MarkdownReaderOptions CreateMarkdigParityProfile() => CreatePortableProfile();
  2. Release notes recommendation: Include migration guidance in release notes since this is a breaking change.

Overall Assessment

This is a well-executed refactoring that:

  • ✅ Removes competitor-specific branding from public APIs
  • ✅ Maintains all functionality with identical behavior
  • ✅ Updates documentation consistently and clearly
  • ✅ Preserves internal test references where appropriate
  • ✅ Follows good API design principles

The PR achieves its stated goal of creating "neutral portable-profile names" while maintaining backward compatibility in behavior (though not in API naming).

Recommendation: ✅ Approve - This is a clean, well-documented breaking change that improves the public API design.


@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@PrzemyslawKlys PrzemyslawKlys force-pushed the codex/markdown-neutral-reader-profiles branch from c713a25 to 977c5e8 Compare March 11, 2026 17:59
@PrzemyslawKlys PrzemyslawKlys merged commit 1048a47 into master Mar 11, 2026
10 checks passed
@PrzemyslawKlys PrzemyslawKlys deleted the codex/markdown-neutral-reader-profiles branch March 11, 2026 18:48
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.

1 participant