Adding an Auto-Preview Feature
At this moment, your tool isn’t automating the entire process. It converts the Markdown to HTML, but the user still has to open it in a browser to see the results. While this is a valid approach, it would be nice for the user to be able to run the tool and automatically see the results. We’re assuming that most users want this feature, but it’s nice to provide an option to disable it in case they prefer to open the file at a different time. As part of this implementation, we’ll add another flag -s (skip-preview) to skip the auto-preview. This option also helps with executing the tests by avoiding automatically opening the files in the browser for every test.
To preview the file in a browser, let’s add another ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access