Closed lukeraymonddowning closed 1 year ago
Maybe it is an idea to add a github action to run the test.
I'm ok with the feature but I don't want to merge the other changes. Feel free to re-open the PR with only the code necessary to implement the feature.
Thank you. And sorry for taking that long to check :)
Currently, there is no way to configure markdown parsing. This can prove to be a problem when you want to add extensions or custom settings to markdown parsing.
With this PR, we add the ability to customise the functionality behind
$post->content
using theWink::parseMarkdownUsing
method. This method accepts aclosure
, which receives a string (the body of the post) and should return astring
orHtmlString
.This will override the default parser and use the custom method whenever
$post->content
is called.This PR also adds a couple of tests in order to make a start adding tests for functionality in Wink.
Kind Regards, Luke