© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
AdmincraftA
Admincraft•2y ago•
3 replies
EarthCow

How to parse curly braces ({}) from a Pebble string?

I want to make a string variable that contains curly braces as it has nested PAPI variables but pebble is taking some of the braces out.

Here's what I'm trying to parse:
randomYamlKey: |-
  &4&m+                                       +
  {% set req = 'placeholder#math_0:0_{statistic_mine_block:COAL_ORE}+{statistic_mine_block:DEEPSLATE_COAL_ORE}' %}
  ...then I would do things with this variable if it worked
  &4&m+                                       +
randomYamlKey: |-
  &4&m+                                       +
  {% set req = 'placeholder#math_0:0_{statistic_mine_block:COAL_ORE}+{statistic_mine_block:DEEPSLATE_COAL_ORE}' %}
  ...then I would do things with this variable if it worked
  &4&m+                                       +

When I use the string as a variable elsewhere it is parsed as
placeholder#math_0:0_statistic_mine_block:COAL_ORE}+{statistic_mine_block:DEEPSLATE_COAL_ORE}
placeholder#math_0:0_statistic_mine_block:COAL_ORE}+{statistic_mine_block:DEEPSLATE_COAL_ORE}
missing the first
{
{
. I tried escaping the curly braces by using two instead of one but then I get the error:
[18:39:46 WARN]: com.mitchellbosecke.pebble.error.ParserException: Unexpected character [&]
[18:39:46 WARN]: com.mitchellbosecke.pebble.error.ParserException: Unexpected character [&]
for some reason. Maybe because pebble for some reason html encodes the curly brace?

I've been trying for a long time now and would really appreciate guidance. Thanks in advance.
AdmincraftJoin
10,704Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Pebble Premium 6GB
AdmincraftAAdmincraft / questions
2y ago
Should I invest in a Pebble server?
AdmincraftAAdmincraft / questions
3y ago
Blocked Port Upstream, Pebble Refuses Support
AdmincraftAAdmincraft / questions
3mo ago
How to purchase a server from someone?
AdmincraftAAdmincraft / questions
3y ago