Skip to content

Refactor GenRTF() and GenHTML() to use shared components #3538

Closed

Description

Description of the new feature/enhancement

#3535 adds GenRTF() to enable RTF Copy. It has some parts that are very similar to GenHTML(), 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.

Activity

  1. added
    Issue-TaskIt's a feature request, but it doesn't really need a major design.
    Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
    on Nov 12, 2019
  2. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Nov 12, 2019
  3. added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    and removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Nov 12, 2019
  4. carlos-zamora commented on Jun 2, 2020

    @carlos-zamora
    Author

    Dustin L. Howett (@DHowett) I was taking a closer look at the differences between GenRTF() and GenHTML(). Refactoring them would just make the code more difficult to understand and risks breaking something. Mind if I just close this issue?

  5. DHowett commented on Jun 2, 2020

    @DHowett
    Member

    Go ahead!

  6. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Issue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions