public static void main(String[] args) throws Exception {

		// Validate input
		if (args.length != 2) {
			throw new Exception("Expected 2 arguments, got " + args.length);
		}
		if (!args[0].toLowerCase().endsWith(".md")) {
			throw new Exception("First argument doesn't not end with .md");
		}

		// Setup the CommonMark Library with the needed extension libraries
		List<Extension> extensions = List.of(HeadingAnchorExtension.create(),
			FootnotesExtension.create(), TablesExtension.create());
		Parser parser = Parser.builder().extensions(extensions).build();
		HtmlRenderer renderer = HtmlRenderer.builder()
				.extensions(extensions)
				.attributeProviderFactory(new TableAttributeProvider())
				.attributeProviderFactory(new HeadingAttributeProvider())
				.attributeProviderFactory(new CodeAttributeProvider())
				.attributeProviderFactory(new LinkAttributeProvider())
				.build();

		// Create output directory (if necessary)
		File inFile = new File(args[0]).getCanonicalFile();
		File outFile = new File(args[1]).getCanonicalFile();
		if (!outFile.getParentFile().isDirectory() && !outFile.getParentFile().mkdirs()) {
			throw new Exception("Failed to create: " + outFile.getParent());
		}

		// Generate and write the HTML
		String html = renderer.render(parser.parseReader(new FileReader(inFile)));
		try (PrintWriter out = new PrintWriter(outFile)) {
			out.write(html);
		}
	}
Converts a Markdown file to an HTML file

@param args An array of 2 arguments: The path of the markdown file to convert, and the path
  to save the new HTML file to
@throws Exception If invalid arguments are passed in, or if there is an issue writing the
  new HTML file
GhidraBuild/MarkdownSupport/src/main/java/ghidra/markdown/MarkdownToHtml.java