Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Split up bodyToHtml #12840

Merged
merged 3 commits into from
Jul 30, 2024
Merged

Split up bodyToHtml #12840

merged 3 commits into from
Jul 30, 2024

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jul 30, 2024

This (very incrementally) splits up the bodyToHtml function to avoid the multiple return types and hopefully make it a touch easier to comprehend. I'd also like to see what the test coverage says about this, so this is is somewhat experimental. This shouldn't change any behaviour but the comments in this function indicate just how subtle it is.

OK, the test coverage is actually pretty decent on this area, and indeed they caught a bug, so, whilst this still leaves a lot to be desired, I'm going to say t's at least an incremental improvement in splitting up the code into something a little easier to reason about.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

This (very incrementally) splits up the bodyToHtml function to avoid
the multiple return types and hopefully make it a touch easier to
comprehend. I'd also like to see what the test coverage says about
this, so this is is somewhat experimental. This shouldn't change
any behaviour but the comments in this function indiciate just how
subtle it is.
@dbkr dbkr added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Jul 30, 2024
src/HtmlUtils.tsx Outdated Show resolved Hide resolved
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

Looks sane

@dbkr dbkr added this pull request to the merge queue Jul 30, 2024
Merged via the queue into develop with commit 272a66b Jul 30, 2024
34 checks passed
@dbkr dbkr deleted the dbkr/split_up_bodytohtml branch July 30, 2024 13:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants