html2markdown icon indicating copy to clipboard operation
html2markdown copied to clipboard

Render <pre><code> constructs as fenced code blocks

Open martin-martin opened this issue 4 years ago • 1 comments

Markdown that uses backticks to indicate code blocks instead of indentation has the advantage that it is very easy to add language-identifier information to it, e.g.:

```python
print("hello")
```

Is there an option to convert <pre><code> HTML into fenced code blocks, or would you be interested to add it?

martin-martin avatar Sep 16 '20 13:09 martin-martin

Wrote a possible adaptation for this in https://github.com/dlon/html2markdown/pull/13

Hope this is helpful and makes sense, happy for any feedback and comments

martin-martin avatar Sep 17 '20 20:09 martin-martin