Skip to content

Commit

Permalink
ruby indent fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fxbois committed Jun 3, 2017
1 parent aef2a32 commit 290f0ec
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 4 deletions.
39 changes: 39 additions & 0 deletions issues/0883.erb
@@ -0,0 +1,39 @@
<div>
<%
content_for :title, t('moderation_queue.moderation_queue')
content_for :h1, t('moderation_queue.moderation_queue')
content_for :body_id, 'moderation_queue-index'
content_for :body_classes, 'moderation_queue index'
%>
</div>

<%# Link showing page number
- available local variables
page: a page object for "this" page
url: url to this page
current_page: a page object for the currently displayed page
total_pages: total number of pages
per_page: number of items to fetch per page
remote: data-remote
-%><%
attrs = {}
attrs['aria-disabled'] = 'true' if page.current?
attrs[:rel] = 'next' if page.next?
attrs[:rel] = 'prev' if page.prev?
attrs[:remote] = remote
-%>
<li class="page<%= ' active' if page.current? %>">
<%= cf_link_to page, url + @doc_fragment.to_s, attrs %>
</li>

<div>
<%
a=x.y_for_w(1)
b=css_class_x2
c=3
d=4
%>
<div>
<div></div>
</div>
</div>
8 changes: 4 additions & 4 deletions web-mode.el
Expand Up @@ -3,7 +3,7 @@

;; Copyright 2011-2017 François-Xavier Bois

;; Version: 15.0.0
;; Version: 15.0.1
;; Author: François-Xavier Bois <fxbois AT Google Mail Service>
;; Maintainer: François-Xavier Bois
;; Package-Requires: ((emacs "23.1"))
Expand All @@ -24,7 +24,7 @@

;;---- CONSTS ------------------------------------------------------------------

(defconst web-mode-version "15.0.0"
(defconst web-mode-version "15.0.1"
"Web Mode version.")

;;---- GROUPS ------------------------------------------------------------------
Expand Down Expand Up @@ -7958,10 +7958,10 @@ another auto-completion with different ac-sources (e.g. ac-php)")
;;(message "%S" prev-line)
(setq prev-indentation (cdr h))
(cond
((string-match-p "^\\(end\\|else\\|elsif\\|when\\)" line)
((string-match-p "^[ ]*\\(end\\|else\\|elsif\\|when\\)" line)
(setq offset (- prev-indentation language-offset))
)
((string-match-p "\\(when\\|if\\|else\\|elsif\\|unless\\|for\\|while\\|def\\|class\\)" prev-line)
((string-match-p "^[ ]*\\(when\\|if\\|else\\|elsif\\|unless\\|for\\|while\\|def\\|class\\)" prev-line)
(setq offset (+ prev-indentation language-offset))
)
(t
Expand Down

0 comments on commit 290f0ec

Please sign in to comment.