[RUBY] Break long slim syntax in the middle

I have such a long syntax when writing html using slim when developing a Rails app. How to break this.

.card-toolbar
  a.btn.btn-primary.status-editable data-confirm="Change the edit permission of all users to "Editable". Is it OK?" style="font-size: 15px; margin: 0 10px;" href="#{toggle_status_editable_admins_supplier_company_path(supplier_company_code: model.code, supplier_company_id: model.id)}" role="button"Editable
  a.btn.btn-danger.status-editable data-confirm="Change the edit permission of all users to "Editable". Is it OK?" style="font-size: 15px; margin: 0 10px;" href="#{toggle_status_not_editable_admins_supplier_company_path(supplier_company_code: model.code, supplier_company_id: model.id)}" role="button"non-editable

You can add a [] to start a new line like this.

.card-toolbar
  a[data-confirm="Change the edit permission of all users to "Editable". Is it OK?" 
    style="font-size: 15px; margin: 0 10px;" 
    href="#{toggle_status_editable_admins_supplier_company_path(supplier_company_code: model.code, supplier_company_id: model.id)}" 
    role="button"]
    .btn.btn-primary.status-editable
     |Editable
  a[data-confirm="Change the edit permission of all users to "Uneditable". Is it OK?" 
    style="font-size: 15px; margin: 0 10px;" 
    href="#{toggle_status_not_editable_admins_supplier_company_path(supplier_company_code: model.code, supplier_company_id: model.id)}" 
    role="button"]
    .btn.btn-danger.status-editable 
     |non-editable

Recommended Posts

Break long slim syntax in the middle
Place in the middle with css
Organized memo in the head (Java --Control syntax)
Break the Spring-Session session