From 59112c1a83a1eeae9d1fe86a7111fd6c53d991cf Mon Sep 17 00:00:00 2001 From: rembo10 Date: Thu, 25 Feb 2016 17:12:30 +0000 Subject: [PATCH] Changed optional values for pathrender to use curly braces --- headphones/pathrender.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/headphones/pathrender.py b/headphones/pathrender.py index a00a1192..67613fb8 100644 --- a/headphones/pathrender.py +++ b/headphones/pathrender.py @@ -25,9 +25,9 @@ * substitution variables, which start with dollar sign ($) and extend until next non-alphanumeric+underscore character (like $This and $5_that). - * optional elements enclosed in square brackets, which render + * optional elements enclosed in curly braces, which render nonempty value only if any variable or optional inside returned - nonempty value, ignoring literals (like [\'[\'$That\']\' ]). + nonempty value, ignoring literals (like {\'[\'$That\']\'}). ''' from __future__ import print_function from enum import Enum @@ -90,8 +90,8 @@ class _OptionalBlock(_Generator): return u"" -_OPTIONAL_START = u'[' -_OPTIONAL_END = u']' +_OPTIONAL_START = u'{' +_OPTIONAL_END = u'}' _ESCAPE_CHAR = u'\'' _REPLACEMENT_START = u'$'