Handling Frankendocs (part Markdown, part HTML)

I mostly write in BBEdit with HTML.

Sometimes I copy to Drafts so I can continue working on it on my iPad. So I wind up with a Frankendoc that’s partly Markdwn and partly HTML that eventually must output to Blogger, which requires HTML.

There’s never any fancy HTML. This is pretty much it:
<b>,<I>,<br>,<blockquote>, <a href=""> and </a>

I can think of two solutions.

  1. Translate the HTML to markdown first thing once I open it in Drafts. Then translate it back to HTML for transfer to Blogger. Problem: I’m not always perfectly efficient, so I’ll still wind up with Frankendocs sometimes

  2. Go ahead and work on the frankendoc in Drafts/Markdown, then run a markdown->HTML script and hope it doesn’t munge any of the preexisting HTML tags.

Are there other solutions that don’t require me to be perfectly consistent on my end?

1 Like

Option 3

Write in Markdown in BBEdit too. Then run a conversion to HTML before posting to Blogger.

For example, you could make Drafts part of your conversion to HTML workflow, or use Pandoc, or Marked2, or use a Python script, or …; the list goes on.

1 Like

Generally speaking, HTML is perfectly legal in Markdown. See pertinent info from original spec.

For the most part, Markdown parsers will leave your HTML tags alone when publishing, so I don’t think it’s a big deal, other than it isn’t as easy to read and does not get syntax highlighting. The exception are for more complex tags, like some parsers have “safe” options to strip dangerous tags, like scripts.

2 Likes

Yeah, I know. Problem is I’ve got 30 years of experience doing it this way, with shortcuts and scripts up the wazoo. Remember the childrens’ book about the kid who effortlessly controls everything in his room via string? That’s me wrangling HTML in BBEdit.

A clunky workflow fully optimized becomes vastly easier than an easy workflow.

Thanks, Greg, that gives confidence :slight_smile:

HTML was released sometime in 1993 (just before I started University, which is why I remember when it was), so given that’s a little less than 30 years, I assume you don’t mean that you have been doing the whole thing that long!! :laughing:

Also don’t forget that a bit of a process review can be beneficial. Drafts and BBEdit have both had some rewrites over the years to improve things. Often the best investments take a bit of effort up front.

On the “HTML is Markdown” front I found some semantics I wanted to express with my md2pptx Markdown to PowerPoint converter were only elegantly expressed with a small amount of HTML. So that’s what I’ve taught md2pptx to support. (md2pptx doesn’t have a proper Markdown parser.)

You’re quite right. Sorry, 28 years. I was a very early web dev/entrepreneur.

Drafts and BBEdit were rewritten, as you say, to improve things. My workflow, by contrast, still works great! Except for this minor obstacle, which, per Greg, turns out not to be an obstacle at all. Without necessity, I’m loathe to invent! :slight_smile:

I do like Markdown, and use it in certain contexts. But at this point I think and dream in HTML, and it feels right even for creative writing. My eye looks for it.

I’m fighting a compulsion to insert a trailing double line break element here:

1 Like