-
Hi :) We're really enjoying using Ghostwriter for our reports but felt that inline comments were a missing feature. I think this is a relatively easy problem to solve with a filter. Each comment begins and ends with @@:
I'm not sure it works, this is because I haven't been able to use it in our documents. I added the function and a line in the "prepare_jinja2_env" function to include it (in Ghostwriter/ghostwriter/modules/reportwriter.py), but I don't see in the filters using {% debug %}. How do you add custom code and filters? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I looked at https://www.ghostwriter.wiki/development/modifying-code in the wiki and found my answer. |
Beta Was this translation helpful? Give feedback.
-
By the way, the correct filter is:
and don't forget to add:
to the function prepare_jinja2_env in ghostwriter/modules/reportwriter.py In the document use strip_html first |
Beta Was this translation helpful? Give feedback.
-
Hey @KomodoGuy, thanks for starting this discussion and updating it with your solution! Support for inline comments is a neat idea I can see implementing. I'll add it to the list for consideration for the road map. |
Beta Was this translation helpful? Give feedback.
I looked at https://www.ghostwriter.wiki/development/modifying-code in the wiki and found my answer.
After changing code run:
docker-compose -f production.yml stop; docker-compose -f production.yml rm -f; docker-compose -f production.yml build; docker-compose -f production.yml up -d