r-lib / downlit

Syntax Highlighting and Automatic Linking
https://downlit.r-lib.org
Other
90 stars 22 forks source link

Use `conditionMessage()` to render conditions #100

Closed davidchall closed 3 years ago

davidchall commented 3 years ago

When following the error constructor design pattern, we might have condition objects with an empty message field. Instead, their message is constructed via the conditionMessage() S3 method. Currently, such condition messages are omitted from the {downlit} output.

davidchall commented 3 years ago

@hadley If you agree with these changes, I wonder if it might be possible to get this into v0.3.0? (Sorry, I wouldn't normally ping you, but I saw you're in the early stages of a release process.)

hadley commented 3 years ago

Sure, could you add a news bullet too please?

davidchall commented 3 years ago

@Hadley - I put the NEWS item immediately after the item about other changes to messages, warnings and errors. Please let me know if you'd prefer it to go at the end?

hadley commented 3 years ago

Looks good, thanks!