1

It appears Google Prettify doesn't like lex parser tags. I've added the following to a blog post that uses prettify to format code:

<!-- Content -->
<div id="content" class="grid_8 suffix_1">
    {{ widgets:area slug="above-body" }}
    {{ template:body }}
</div>

The two lines of lex code (in between the {{ }}) disappear in the post. If I change them to single brackets, they look OK. I assume prettify uses a similar sort of tagging syntax, which would explain this. Is there a way around it?

Dan Bough
  • 499
  • 1
  • 10
  • 23

1 Answers1

0

You don't link to your blog post and it seems to prettify just fine on this page, so I can't really diagnose the problem, but if you want to file a bug with your HTML at http://code.google.com/p/google-code-prettify/issues/list I'll take a look.

Mike Samuel
  • 118,113
  • 30
  • 216
  • 245
  • I agree.. it prettifies fine on this page. I didn't add the code to the article because of the disappearing text ( used a screenshot instead ). I wanted to verify prettify didn't actually use double brackets for something before I scoped the issue more. I'll do that now & report back. – Dan Bough Nov 12 '12 at 10:12
  • I believe I've ruled out Prettify as the issue (removed PrettyPrint() call from the body tag. The code still disappears.) I believe it's a PyroCMS issue. Thanks for your feedback & sorry if I wasted any of your time. – Dan Bough Nov 12 '12 at 10:40
  • @DanB. No problem. Happy blogging. Now that I think about it, you might look at template systems as a culprit. Some, like jQuery templates (see ["Template Tags"](http://api.jquery.com/tmpl/)) use pairs of curly brackets. – Mike Samuel Nov 12 '12 at 16:53
  • The template system PyroCMS uses is the culprit. Apparently you can add template tags around your template tags to prevent them from being parsed (and therefor shown in
     tags for example. )  [SOURCE](https://www.pyrocms.com/forums/topics/view/21781).
    – Dan Bough Nov 13 '12 at 19:26