parsedown / laravel

Parsedown for Laravel

Home Page:http://parsedown.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parse a block of markdown

Vinze opened this issue · comments

Would it be possbile to use the blade directive like this?

@parsedown
# How to setup you account
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Numquam obcaecati
atque adipisci ex ipsa eius odit. Amet illo possimus eius officiis quaerat
modi beatae, nemo ea deserunt minus a culpa.

## Checklist
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Aliquam nec nulla non lorem hendrerit pulvinar vel non justo.
- Pellentesque in ligula porta nibh auctor tristique.
@endparsedown

For now I've solved it by using a blade component but I guess it would be nice to have this functionality built in.

components/parsedown.blade.php:

@parsedown($slot)

Usage:

<x-parsedown>
(markdown content)
</x-parsedown>

Hey @Vinze, that would be in fact a nice addition. Let me see what I can do in the next few days.