Skip to content

Commit

Permalink
Split out HTML processing from markdown conversion for API generation (
Browse files Browse the repository at this point in the history
…#614)

This splits out all of the HTML helper functions from `htmlToMd.ts` into
`processHtml.ts`. `processHmtl.ts` is where we have all of our Cheerio
code that deals with HMTL -> HTML, whereas `htmlToMd.ts` goes from HTML
-> MD.

This PR avoids making refactors to the source code to keep this easier
to review. A follow up PR will add tests.
  • Loading branch information
Eric-Arellano authored Jan 11, 2024
1 parent d734842 commit 88a13bc
Show file tree
Hide file tree
Showing 4 changed files with 464 additions and 409 deletions.
7 changes: 6 additions & 1 deletion scripts/lib/api/HtmlToMdResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@

import { Metadata } from "./Metadata";

export type Image = {
src: string;
dest: string;
};

export type HtmlToMdResult = {
markdown: string;
meta: Metadata;
images: Array<{ src: string; dest: string }>;
images: Image[];
isReleaseNotes: boolean;
};

Expand Down
Loading

0 comments on commit 88a13bc

Please sign in to comment.