use JSON stringify

pull/7/head
yann300 8 years ago
parent ec08f732fb
commit 120b95b071
  1. 2
      src/ui/SolidityTypeFormatter.js

@ -12,7 +12,7 @@ function formatData (key, data) {
var style = fontColor(data) var style = fontColor(data)
var keyStyle = data.isProperty ? 'color:#847979' : '' var keyStyle = data.isProperty ? 'color:#847979' : ''
if (data.type === 'string') { if (data.type === 'string') {
data.self = '"' + data.self + '"' data.self = JSON.stringify(data.self)
} }
return yo`<label style=${keyStyle}>${key}: <label style=${style}>${data.self}</label><label style='font-style:italic'> ${data.isProperty ? '' : data.type}</label></label>` return yo`<label style=${keyStyle}>${key}: <label style=${style}>${data.self}</label><label style='font-style:italic'> ${data.isProperty ? '' : data.type}</label></label>`
} }

Loading…
Cancel
Save