Skip to content

Conversation

@matt-goldman
Copy link
Owner

Summary

  • Added new binary file blake.png.
  • Enhanced ImageCaptionRenderer with regex support for parsing shorthand dimensions from image URLs.
  • Updated class definition to public partial and added a static readonly field for regex.
  • Modified Write method to apply shorthand dimensions if no explicit width/height attributes are present.
  • Introduced ParseShorthandDimensions method for dimension extraction and HtmlEscape method for safe HTML encoding.

🧷 This PR will be released as a preview by default.

To trigger a stable release:

  • Remove the preview label
  • Add the release label
  • Optionally add Semver-Minor or Semver-Major to control version bump

🏷️ Add labels to control release notes:

  • enhancement, bug, breaking-change, dependencies
  • Or use ignore-for-release to suppress it from notes

- Added new binary file `blake.png`.
- Enhanced `ImageCaptionRenderer` with regex support for parsing shorthand dimensions from image URLs.
- Updated class definition to `public partial` and added a static readonly field for regex.
- Modified `Write` method to apply shorthand dimensions if no explicit width/height attributes are present.
- Introduced `ParseShorthandDimensions` method for dimension extraction and `HtmlEscape` method for safe HTML encoding.
Copilot AI review requested due to automatic review settings August 31, 2025 20:10
@github-actions github-actions bot added preview Triggers a release of preview version of Nuget packages enhancement New feature or request Blake.MarkdownParser labels Aug 31, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the ImageCaptionRenderer class to support shorthand dimension syntax in image URLs, allowing users to specify image dimensions directly in the URL (e.g., "/image.png =200x300") instead of requiring explicit HTML attributes.

Key changes:

  • Added regex-based parsing for shorthand dimensions in image URLs
  • Enhanced the renderer to automatically apply parsed dimensions as HTML attributes when explicit dimensions aren't provided
  • Converted the class to use source-generated regex for better performance

@matt-goldman matt-goldman added release Triggers a release of a production version of Nuget packages Blake.BuildTools and removed preview Triggers a release of preview version of Nuget packages labels Aug 31, 2025
@matt-goldman matt-goldman merged commit 902f36f into main Aug 31, 2025
2 checks passed
@matt-goldman matt-goldman deleted the add-image-size-shorthand branch August 31, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blake.BuildTools Blake.MarkdownParser enhancement New feature or request release Triggers a release of a production version of Nuget packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants