Use {{}} in shortcode

Problems with referencing React in Hugo.
I need in shortcode

<script type="text/babel">
  <div style={{ margin: '16px 0' }} /></div>

But there was a mistake.
Hugo has parsed {{}}, how can I avoid this.

To my knowledge, you can’t get around the delimiters that Golang uses for templating (i.e {{}}).

Just do a workaround:

var divStyle = {
  margin: '16px 0'
<script type="text/babel">
  <div style={divStyle} /></div>

This should work.


Thank you very much