.erb format support
See original GitHub issueWondering if there’s any plans for this plugin to support .erb
format?
Prettier already supports .html
format but if passed .html.erb
it fails.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Language: Embedded Ruby (ERB) template syntax - Puppet
An ERB template looks like a plain-text document interspersed with tags containing Ruby code. When evaluated, this tagged code can modify text in...
Read more >class ERB - Documentation for Ruby 2.3.0
ERB provides an easy to use but powerful templating system for Ruby. Using ERB , actual Ruby code can be added to any...
Read more >ERB File Extension - What is an .erb file and how do I open it?
ERB is often used for templating Web files such as .RB, .RHTML, .HTML, and .JS files. Open over 150 file formats with File...
Read more >An Introduction to ERB Templating - Field Notes
ERB templates combine plain text with Ruby code for variable substitution and flow control, making them easy to write and maintain. Although ERB...
Read more >What is an ERB file? - Online converter
ERB files contain source code written in a programming language of the same name. The ERB language is essentially a Ruby templating language....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Hashnode Post
No results found
I think it’s really close actually! It does not seem to be breaking our HTML at all, just a few small styling nits and i think this could be shipped.
Formatting Inline Ruby
A: If we format a file with this content:
B: Prettier will output:
This isn’t wrong; it’s fully syntactically valid. However, I think the A output looks better. Would it make sense to treat the inline ruby
<%
tags the same way as abr />
is treated, so it will keep the line breaks?Yeah absolutely! Still working on how to make that work exactly. Currently there isn’t a lot of support for templating languages in general. There’s some discussion going on w/r/t prettier as a whole, so I’m following that.