The first bugs arrive!

I knew that as soon as I started putting real content in on a live server that ‘interesting’ things would happen. Spotted so far:

  • Formatting inside <pre> tags does not work in gemtext
  • Underscores are being turned into slash underscores: \_.
  • Inline links look pretty bad. This is never going to be perfect but I’m sure it could be better than this example:
    the first paragraph of this page isn’t great
  • ” is being showing up as &quot; on the home page.

WordPress uses PHP but I couldn’t find any PHP-based libraries to convert HTML to Gemtext so ended up coding an API to do it, using Python. It was easier to use Python because a HTML to Markdown library exists and so does a Markdown to Gemtext library. I just needed to glue them together to make the API and then have the WordPress plugin call the API.

Hopefully some of the above issues can be resolved by simply calling the API with different parameters.

Html to Gemtext API

1 Comment

Comments are closed.