BenjaminHoegh / ParsedownExtended

ParsedownExtended is an extention for Parsedown, offering additional features and functionalities.
https://benjaminhoegh.github.io/ParsedownExtended
MIT License
37 stars 7 forks source link

Setter for $options #45

Closed varrg closed 9 months ago

varrg commented 1 year ago

Parsedown allows setting options through per-option setters (setBreaksEnabled, setMarkupEscaped, ...) which is handy when using the lib with Parsedown::instance()->text($str)

ParsedownExtended does not allow this, effectively forcing us to use (new ParsedownExtended($options))->text($str))

There should be a setOptions() method!

BenjaminHoegh commented 1 year ago

you thinking on having setters for each option or a separate function setOptions(array, $array)

what would you prefer ?

varrg commented 1 year ago

Maybe both, to keep in line with parsedown and offer the more convenient set with array method