themsaid / ibis

A PHP tool that helps you write eBooks in markdown and convert to PDF.
MIT License
1.97k stars 150 forks source link

Feature: build life cycle callbacks (prehtml, prepdf, etc) #13

Open bmcminn opened 4 years ago

bmcminn commented 4 years ago

I tend to use C style inline comments (// comment here) in my markdown files because:

It would be helpful if I could register a standard event hook callback in my ibis.php that BuildCommand.php issues before converting a file to HTML from markdown.

I have a working proof of concept in my own fork of the repo that introduces a prehtml() global function that one can optionally provide in their ibis.php if they want to preprocess their markdown content for whatever reason.

themsaid commented 4 years ago

That's a nice idea. Can you open a Pull Request?

bmcminn commented 4 years ago

Working on a PR right now