christopher-ramirez / secretary

Take the power of Jinja2 templates to OpenOffice and LibreOffice.
Other
190 stars 48 forks source link

New features for markdown filter #36

Closed RomainTT closed 6 years ago

RomainTT commented 7 years ago

These commits are mainly introducing table and images management for the markdown filter.

A few things that you may not like:

If you have any idea to improve these issues, I'll take it !

RomainTT commented 6 years ago

FYI I'm currently working on a new code based on your development branch. I really like the new architecture of your code ! Good job !

edit: Do you know if your development branch is working fine about the markdown filter ? I can't make it work on a simple example.

christopher-ramirez commented 6 years ago

@RomainTT thank you!

The last time I worked on it, it was working fine.

RomainTT commented 6 years ago

I am closing this pull request because I will make new commits based on your development branch.

christopher-ramirez commented 6 years ago

The new version of Secretary will allow to plug new filters. The architecture is still not documented. But you can check out the new implementation of the markdown filter. See the SecretaryFilterInterface interface and its implementation in MarkdownFilter. Have a look into the before_render_xml and after_render_xml methods. These method are used for storing the filter state while jinja is rendering/producing a new document. The render does the magic.

You can write your own extended markdown filter and then plug it into the library. Do not hesitate to write me if you need further help.