Skip to content

Conversation

@eread
Copy link
Contributor

@eread eread commented Feb 12, 2026

Match message with rule MD054 configuration option.

Currently, the message that's returned doesn't 100% match the configuration option itself.

@eread
Copy link
Contributor Author

eread commented Feb 12, 2026

@rvben could you review this one? 🙇🏻

Copy link
Owner

@rvben rvben left a comment

Choose a reason for hiding this comment

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

Good catch. The warning message should match the config key url-inline rather than the internal field name url_inline.

Right now the PR only updates the test assertion, so the test would fail since the implementation still outputs url_inline. A few more spots need updating in src/rules/md054_link_image_style.rs:

  • Line 98 in is_style_allowed:
    "url-inline" => self.config.url_inline,
  • Line 208 where the match style is assigned:
    style: if text == url { "url-inline" } else { "inline" },
  • Line 405 in the test file has a second assertion that needs the same change:
    assert!(result[0].message.contains("'url-inline'"));

Could you update the PR with these?

@eread eread force-pushed the eread/match-message-with-rule-md054-configuration-option branch from e5cc97f to c961745 Compare February 12, 2026 23:04
@eread
Copy link
Contributor Author

eread commented Feb 12, 2026

Good catch. The warning message should match the config key url-inline rather than the internal field name url_inline.

Right now the PR only updates the test assertion, so the test would fail since the implementation still outputs url_inline. A few more spots need updating in src/rules/md054_link_image_style.rs:

  • Line 98 in is_style_allowed:
    "url-inline" => self.config.url_inline,
  • Line 208 where the match style is assigned:
    style: if text == url { "url-inline" } else { "inline" },
  • Line 405 in the test file has a second assertion that needs the same change:
    assert!(result[0].message.contains("'url-inline'"));

Could you update the PR with these?

@rvben I can! I'm afraid I only figured out how to run the test suite after I pushed this and asked for review 😅

The tests pass now 🙇🏻

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