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.

When there's interpolated variables, the templates break

See original GitHub issue

Hey, we’re a SF company and we use your library, we’re pretty happy with it keep up the good work!

There’s something we noticed: When there’s an interpolated variable like <p class="paragraph" style="background: {{color}]>hello</p>, the styles from the class won’t be part of the style attribute, and also this breaks the inline styles of other <p> tags in the same template, they don’t get the styles either.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jonkempcommented, Mar 6, 2018

New version is out with this feature 7cdc0dd7f6df9516f488d1858703bff79a6e7478.

Here’s the updated docs on how to use it.

https://github.com/jonkemp/inline-css#optionscodeblocks

Closing.

1reaction
yasufcommented, Mar 6, 2017

I agree, this is probably a feature request, and yes that was a typo

Read more comments on GitHub >

github_iconTop Results From Across the Web

string interpolation - format string output - Microsoft Learn
When an interpolated string is resolved to a result string, items with interpolation expressions are replaced by the string representations of ...
Read more >
String interpolation on variable - javascript - Stack Overflow
var template = function(tpl, args) { var keys = Object.keys(args), ... It is likely to be very slow and break down on lots...
Read more >
Template literals (Template strings) - JavaScript | MDN
Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded ...
Read more >
String interpolation - Wikipedia
In computer programming, string interpolation is the process of evaluating a string literal containing one or more placeholders, yielding a result in which ......
Read more >
Interpolating Functions and Expressions Within Strings - O'Reilly
This lets you construct more complex templates than with simple scalar variable interpolation. Solution. You can break up your expression into distinct ...
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