Refactor GenRTF() and GenHTML() to use shared components #3538
Labels
Area-CodeHealth
Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
Issue-Task
It's a feature request, but it doesn't really need a major design.
Needs-Tag-Fix
Doesn't match tag requirements
Product-Terminal
The new Windows Terminal.
Milestone
Description of the new feature/enhancement
#3535 adds
GenRTF()
to enable RTF Copy. It has some parts that are very similar toGenHTML()
, which makes sense. It'd be nice to find a way to refactor the code a bit to reuse some sections.My concern is that we make find a bug and fix it in one and not the other.
Proposed technical implementation details (optional)
We could probably use a few helper methods to create a more distinct separation of HTML vs RTF specific portions. The overall architecture and flow of both functions are essentially the same. Maybe even add an enum?
Bonus points
Make GenHTML()
noexcept too.The text was updated successfully, but these errors were encountered: