GNU bug report logs -
#69344
ELPA process collapses Markdown fenced code block into 1 line for HTML page
Previous Next
Full log
View this message in rfc822 format
Okamsn <okamsn <at> protonmail.com> writes:
> Hello,
>
> While working on adding my package to Non-GNU ELPA, I noticed that the
> `make build/loopy` process collapsed the fenced code blocks in the file
> "CHANGELOG.md" into 1 line in the HTML output.
>
> I have attached the Markdown file "CHANGELOG.md" and the outputted file
> "loopy.html". The squashed code blocks can be seen towards the end of
> the HTML file when viewed in EWW and Chromium.
(In case anyone else is confused by the same thing as I was, apparently
Gnus renders the code blocks and removed the backticks.)
> Thank you.
[...]
> ```emacs-lisp
> ;; Now correct behavior (would previously error):
> ;; => 6
> (loopy (list i '(1 2 3))
> (reduce i #'*))
> ```
Elpa-admin.el uses the original markdown implementation by John Gruber
or markdown2 (https://pypi.org/project/markdown2/) to render Markdown,
which apparently doesn't handle formatted code blocks:
--8<---------------cut here---------------start------------->8---
$ markdown
```emacs-lisp
;; Previously erroneously returned 27:
;; => nil
(loopy (with (val 27))
(list i '(1 2 3))
(find val nil (> i 10) :on-failure nil)
(finally-return val))
```
<p><code>emacs-lisp
;; Previously erroneously returned 27:
;; => nil
(loopy (with (val 27))
(list i '(1 2 3))
(find val nil (> i 10) :on-failure nil)
(finally-return val))
</code></p>
--8<---------------cut here---------------end--------------->8---
or rather it handles them as regular fixed-with formatting sequences.
The quick fix would just be to use classical indented code-blocks, but
it would be worth considering a more robust and predictable markdown
implementation like cmark.
This bug report was last modified 1 year and 112 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.