question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for formatting placeholders

See original GitHub issue

Any thoughts towards providing string formatting in the placeholder like

{{Placeholder[,alignment][:formatString]}}

An actual example of this would be

{{Quantity,7:F1}}

which would emit a numeric with one decimal place with spaces on the left to make a total width of 7.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mrbelkcommented, Nov 15, 2018

It doesn’t, no, and I know your stated goal is to simply provide a “pure” .NET port of handlebarsjs and so you’re probably disinclined to add this. But… there is another mustache/handlebars .Net port out there that does this and it’s very convenient because it removes the necessity of having to build out these helpers

0reactions
akamyshanovcommented, Apr 9, 2020

@vzwick Just for reference, I believe the mentioned library is mustache-sharp. And indeed, formatting support is very handy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Named Placeholders in String Formatting
In this tutorial, we'll explore how to make string formatting support named parameters. 2. Introduction to the Problem. The String.format() ...
Read more >
Placeholders in Resource Files
The placeholder_format directive lets you specify that your placeholders are in a common, well-known syntax. Options are C, IOS, PYTHON, JAVA, YAML, QT,...
Read more >
Placeholders (Strings)
When creating or editing a project, specify the placeholder formats within the Placeholders tab. Select all required format styles and see all matching ......
Read more >
Python String format() Explain with EXAMPLES
Using string.format() method, you can add padding, space by using placeholders inside your string. Example: In below example will add space ...
Read more >
Content placeholders: Frequently asked questions - Support
Can content placeholders be used for content that requires specific formatting? You can apply value and rich text formatting on each placeholder ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found