picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.83k stars 614 forks source link

FigureExtParsedownPicoPlugin & markdown IDs & definition lists #516

Closed anasram closed 4 years ago

anasram commented 4 years ago

Pico version: 2.1.0-beta.1

When I use FigureExtParsedownPicoPlugin, elements' IDs in markdown don't be converted to HTML ones.

For example:

## About {#about}

doesn't look in HTML like this:

<h2 id="about">About</h2>

rather, it remains like this:

<h2>About {#about}</h2>

However, when I remove FigureExtParsedownPicoPlugin, it works properly.

Definition lists have the same problem.

Is it Pico's fault? or Parsedown's, or it is the plugin itself?

PhrozenByte commented 4 years ago

It's the Parsedown extension. It's extending from Parsedown, not from ParsedownExtra, consequently you can't use any of ParsedownExtra's features. Try replacing the line

class FigureExtParsedown extends Parsedown {

by

class FigureExtParsedown extends ParsedownExtra {

However, no guarantees, I haven't tested this, Pico 2.1 includes Parsedown 1.8, which changed some internal functions which might break existing Parsedown extensions.

anasram commented 4 years ago

Thanks! It solved the IDs' problem.

However, for definition lists, the problem persists.

PhrozenByte commented 4 years ago
Lorem ipsum dolor sit amet
: Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

results in

Bildschirmfoto von 2019-11-09 10-58-07

in Pico 2.1.0-beta.1 when using ParsedownExtra, so it looks like the Parsedown extension somehow prevents ParsedownExtra from properly handling the definition lists. Contact the Parsedown extension's developer.

stale[bot] commented 4 years ago

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