benbalter/wordpress-to-jekyll-exporter

Syntax highlighting is lost during conversions

Closed this issue · 3 comments

Examples:

  1. PowerShell - source, taget
  2. XML - source, target

It looks like XML characters, specifically <> and >, trip it up.

Ahh, so it looks like we need to not XML escape < and >s when they're in a code block? I believe Markdownify is what's doing the escaping and may not be code-block-aware.

The problem is that code blocks stay as <pre> (and/or possibly <code>), rather than get converted to markdown code blocks (with backticks).

Ideally something like <pre class="brush: powershell">&lt;foo&gt;</pre> would be converted to:

```powershell 
<foo>
```
stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.