Skip to content

Instantly share code, notes, and snippets.

@ibrahima
Created July 28, 2016 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibrahima/c86adb15d8849b62ba6cbeae306abc8a to your computer and use it in GitHub Desktop.
Save ibrahima/c86adb15d8849b62ba6cbeae306abc8a to your computer and use it in GitHub Desktop.
A sample slim template that causes slim-lint to report errors on the wrong lines
- provide :title, 'Title'
- provide :viewport, 'desktop'
= render 'partials/sidebar'
- action_bar do
div.action-bar-label
= fa_icon('spinner', class: 'fa-spin')
| Loading...
#content-container
h1 Heading
.instructions-and-upload-form
.instructions
p
| Some instruction text.
A very long line consisting of some more instructions, which goes over the slim-lint maximum line length.
More instruction text.
- if @some_variable > 0
p
| A very long line consisting of some more instructions, which goes over the slim-lint maximum line length.
A very long line consisting of some more instructions, which goes over the slim-lint maximum line length. #{link_to "link_text", some_rails_path_helper(@model1, @model2)}.
A very long line consisting of some more instructions, which goes over the slim-lint maximum line length. <strong>Do something</strong>.
.upload-form
= form_for @attachment, role: 'form', url: some_rails_path_helper_that_makes_this_line_too_long(@model1, @model2) do |f|
= f.labeled_file_upload :file, "Select", "Files", multiple: true, data: { prompt: "Select file(s)" }
= f.submit "Upload files(s)", id: "submit", class: ['btn', 'btn-primary']
= react_component('MyReactApp',
arg1: @arg1, arg2: @arg2, arg3: @arg3, arg4: @arg4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment