Add support for custom placeholder regexes

We have hundreds of strings in our glossary which follow the same format that could easily be one regex statement.

Hello, could you show us an example?

Hey,

For example, strings like &0, &2, &c etc. we have a few dozen of those, they’re interpreted in the frontend of our application for text formatting.

They could all be condensed into a single regex statement: &[a-z0-9]

I wouldn’t expect to see an option to translate a regex statement, but they’d be useful for significantly condensing our glossary.

Thanks

p.s. I notice <markup> and {placeholders} are highlighted automatically, is there a list of these formats, and where in the documentation is this behavior detailed? Thanks

Hello,
From what you’ve described it seems that you’re looking for a definition of custom placeholders not glossary terms.
This is, as you know already, not possible at the moment. However, if your placeholders are commonly used in some framework/library, we’ll be happy to add support fo them to our UI highlighter. Also we’re planning to add support for HTML entities soon.

As for the list of highlighted placeholders/special symbols – it’s not documented yet, but I’ll take this as an opportunity to share it here at least for now:

  • iOS placeholders as per specs (String Format Specifiers)
  • Android placeholders as per Java specs
    (Formatter (Java Platform SE 7 ))
  • Neon placeholders: %placeholder%
  • Single braces {placeholder}
  • Double braces {{placeholder}}
  • Dollar symbol $placeholder or $placeholder$
  • Dollar with braces ${placeholder}
  • Colon placeholder :placeholder
  • HTML/XML markup

Hope this helps :slight_smile:

Cool, what we’re looking for is custom placeholders in this case.

It’s also worth providing an option to disable certain types of placeholders either globally or on a per-string basis. as there are situations such as command references which specify things like /migrate <name> <mode> which is confused as markup.

(post deleted by author)

1 Like