1

after installing erusev/parsedown library package i want to make internal links with Markdowns like with this code:

$Parsedown = new Parsedown();
echo $Parsedown->text("* [Hello](#hello)  
                            * [Hello World](#hello-world)
                            * [Another section](#new-section)

                            ## Hello
                            ### Hello World
                            ## New section");

in this code i expect ## New section must be have id, but after show this markdown this part of text doesn't have any id to make simple internal link

pspatel
  • 508
  • 2
  • 7
  • 18
DolDurma
  • 15,753
  • 51
  • 198
  • 377

1 Answers1

1

You have to include the extension of the Parsedown class. You just need to include the ParsedownExtra.php file (or if you are using Composer, just composer require erusev/parsedown-extra) and make an instance of the ParsedownExtra class. See more

Hope this will solve your problem.

pspatel
  • 508
  • 2
  • 7
  • 18
  • Thanks a lot, could you show me how can i create internal link on this link : http://parsedown.org/extra/ ? thanks – DolDurma May 30 '18 at 07:43
  • I hope this will help you do initial code https://michelf.ca/projects/php-markdown/extra/ – pspatel May 30 '18 at 07:52