pebble icon indicating copy to clipboard operation
pebble copied to clipboard

Inline Verbatim Syntax

Open nward-terafuze opened this issue 6 years ago • 3 comments

I suggest adding a note to the documentation for the Verbatim tag to point out that a string literal can be used for inline verbatim text. I found that Pebble works the same as the popular Jinja2 Python template engine in this regard. However, the documentation for Jinja2 addresses inline verbatim text (referred to as inline raw text in Jinja2), but Pebble docs doesn't. I actually assumed that I had to use the verbatim tag inline, which looked terrible and only realized that I could do the same as in Jinja2 when I was about to post an enhancement request here.

For example, I am need to include {{ in the output of a template with text before and after it on the same line. I found that I could do the following in Pebble...

     {{ "{{" }}

However, I made several templates where I didn't know that I could do this and so I did the following...

    {% verbatim %}{{{% endverbatim %}

With other text on the line before and after it, which looked terrible.

Nathan

nward-terafuze avatar Jan 14 '19 03:01 nward-terafuze

You can contribute and submit a pull request for that. All documentation are in docs module

https://github.com/PebbleTemplates/pebble/tree/master/docs/src/orchid/resources/wiki

ebussieres avatar Jan 15 '19 21:01 ebussieres

I will do that sometime soon. Might be a couple of weeks, but I'll get to it.

nward-terafuze avatar Jan 27 '19 20:01 nward-terafuze

@ebussieres Hi, pull request seems merged. Close issue?

ogrammer avatar Dec 11 '20 22:12 ogrammer