flask-markdown icon indicating copy to clipboard operation
flask-markdown copied to clipboard

Add in auto_reset

Open brmullikin opened this issue 8 years ago • 3 comments

Hi,

Python Markdown has the feature of not reseting between uses of Markdown.convert() but this is sometimes undesirable. Sometimes it's desirable to do a reset before each call. And this is best handled (imho) within Flask-Markdown.

I've modified my local version of flask-markdown to have a auto_reset flag, much like the auto_escape flag.

I'm happy to do a pull request to add it in, but want to gauge interest first.

Thoughts?

Cheers,

Ben

brmullikin avatar May 11 '16 03:05 brmullikin

Hopefully the author hiatus will end soon and we can update this repo.

Until then, I've forked this project at https://github.com/brmullikin/flask-markdown. If anyone else has pull requests or features I'm happy collaborate with them there.

brmullikin avatar Jul 02 '16 22:07 brmullikin

@brmullikin Do you mean that a change in the markdown text is rendered only after terminating and restarting flask? (I'm not sure because I've been using flask-markdown for less than an hour, and I haven't dug as deep as markdown.convert() yet.)
If yes, then I agree that auto_reset feature is useful.

RolfBly avatar Sep 25 '16 20:09 RolfBly

Hi @RolfBly,

Take a look at this Python Markdown Issue comment and my comment. The idea is that you are responsible for calling reset() when you think it's appropriate.

brmullikin avatar Sep 26 '16 00:09 brmullikin