Bring back .parse
icco opened this issue · 3 comments
icco commented
I would love if I could call parse on a string, which doesn't seem to work with the new rewrite. I tried the following three, and all throw exceptions.
FrontMatterParser.parse(body)
prsr = FrontMatterParser::Parser.new(:slim)
fmp = prsr.parse(body)
FrontMatterParser::Parser.parse(body)
icco commented
Thoughts @waiting-for-dev?
waiting-for-dev commented
Hi @icco ,
I now see that I made a mistake in the README. The method to parse a string has been renamed to call
(as instance method):
prsr = FrontMatterParser::Parser.new(:slim)
fmp = prsr.call(body)
This has been a major rewrite of the library. From now on you can expect the API to be more stable.
The README is now fixed.
icco commented
That works, thanks!