How to input return whitespace in ERB template?

by using sinatra and I want generate a webVTT, which take the whitespaces into account, to make a identical return file like: WEBVTT 1 00:00:22.865 --> 00:00:30.413 Now we are gonna focus on the hihats, and this is where you actually get to hold these sticks. And 2 00:00:30.416 --> 00:00:37.745 I play matched grip which is where your both the sticks are held in the same way, a lot of people called traditional grip, I made the following code, with iterate a hash object converted from json: WEBVTT <% @sub_json['data'].each_with_index do |value, index|%> <%= index+1 %> <%= value['start'].to_time %>--><%= value['end'].to_time%> <%= value['en'] %> <%= %> <% end %> the result doesn't work, I paste the request from browser to vim and use `set list!` to show all the whitespaces, it seems all the return whitespaces are removed, I guess this is the reason that my code doesn't work anyone know how to add whitespaces to make the code working?

以上就是How to input return whitespace in ERB template?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏