erusev / parsedown

Better Markdown Parser in PHP
https://parsedown.org
MIT License
14.69k stars 1.12k forks source link

Documentation of returned array #807

Open SirPL opened 3 years ago

SirPL commented 3 years ago

I'm struggling with understanding how to create own extension to parsedown, more specificaly - what to return in implementation of functions registered with addInlineType and addBlockType.

Is there any documentation which explains supported and expected keys and values of returned array?

taufik-nurrohman commented 3 years ago

I just managed to get the returned array data without reference using var_dump($this->blockFencedCode(...));exit; and the like.

SirPL commented 3 years ago

I'm registering a function with addInlineType and when I append sub-blocks to elements parameter, it's not working (text works fine).

I suspect that inline type doesn't support nested elements. But I can't confirm it easily that there's no documentation on this. Also, what's the handler for? How it works? Etc...

Maybe I'm too demanding, but I'd really appreciate having the interface documented.

taufik-nurrohman commented 3 years ago

Are you talking about the v2.x.x? Because I don’t see any addInlineType method even in the master branch.