Closed BrainStone closed 4 years ago
Now looking at the whole thing, enableMath
doesn't seem to exists and what does enabling KaTeX even do? I can see no difference in the generated HTML...
Nevermind. Found the issue. All good in the department of there being no difference
sorry for the bad documentation, I'm not that good at writing English.
Also what's the difference between
enableMath
andenableKatex
?
My mistake, there should only be one
So I'm struggling to get the inline TOC
Can you show the code there include the TOC ?
I add [toc]
to the markdown, as mentioned here: https://github.com/BenjaminHoegh/parsedown-toc#usage
And it just prints [toc]
as is.
I add
[toc]
to the markdown, as mentioned here: https://github.com/BenjaminHoegh/parsedown-toc#usageAnd it just prints
[toc]
as is.
Oh I see, my bad. I have updated the documentation now.
To enable [toc]
in your markdown document you have to use the following code:
$body = file_get_contents('test1.md');
$Parsedown->toc([
'selector' => ['h1','h2','h3','h4','h5','h6'],
'inline' => true
]);
echo $Parsedown->text($body);
Awesome. Thanks!
No that doesn't work. That's the error I get:
Call to undefined method ParsedownExtreme::toc()
Sorry for all the trouble you have. I will investigate this today and hopefully publish a fix for this later today
Hi there. Sorry if this is not the right place, but here goes nothing.
So I'm struggling to get the inline TOC to work with
[toc]
. Do I need to enable it somehow?Also what's the difference between
enableMath
andenableKatex
? Don't they both enable parsing of math blocks? What happens when I enable both?