[前][次][番号順一覧][スレッド一覧]

ruby-changes:66515

From: Nobuyoshi <ko1@a...>
Date: Mon, 21 Jun 2021 11:08:33 +0900 (JST)
Subject: [ruby-changes:66515] 28933c1071 (master): Adjust indents

https://git.ruby-lang.org/ruby.git/commit/?id=28933c1071

From 28933c1071b2238066fdc428208745507de33a63 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 21 Jun 2021 11:08:02 +0900
Subject: Adjust indents

---
 template/encdb.h.tmpl | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/template/encdb.h.tmpl b/template/encdb.h.tmpl
index b3bd545..b797099 100644
--- a/template/encdb.h.tmpl
+++ b/template/encdb.h.tmpl
@@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/template/encdb.h.tmpl#L1
-<%
+<% #-*- mode: ruby -*-
 #
 # OnigEncodingDefine(foo, Foo) = {
 #   ..
@@ -70,13 +70,13 @@ encdirs.each do |encdir| https://github.com/ruby/ruby/blob/trunk/template/encdb.h.tmpl#L70
             encodings << $1
           when /^ENC_REPLICATE\(\s*"([^"]+)"\s*,\s*"([^"]+)"/
             raise ArgumentError,
-            '%s:%d: ENC_REPLICATE: %s is not defined yet. (replica %s)' %
-              [fn, f.lineno, $2, $1] unless defs[$2.upcase]
+                  '%s:%d: ENC_REPLICATE: %s is not defined yet. (replica %s)' %
+                  [fn, f.lineno, $2, $1] unless defs[$2.upcase]
             count += 1
           when /^ENC_ALIAS\(\s*"([^"]+)"\s*,\s*"([^"]+)"/
             raise ArgumentError,
-            '%s:%d: ENC_ALIAS: %s is not defined yet. (alias %s)' %
-              [fn, f.lineno, $2, $1] unless defs[$2.upcase]
+                  '%s:%d: ENC_ALIAS: %s is not defined yet. (alias %s)' %
+                  [fn, f.lineno, $2, $1] unless defs[$2.upcase]
           when /^ENC_DUMMY\w*\(\s*"([^"]+)"/
             count += 1
           else
@@ -89,12 +89,13 @@ encdirs.each do |encdir| https://github.com/ruby/ruby/blob/trunk/template/encdb.h.tmpl#L89
     end
   end
 end
-encodings.each_with_index do |e, i|
-%>ENC_DEFINE("<%=e%>");
+-%>
+% encodings.each_with_index do |e, i|
+ENC_DEFINE("<%=e%>");
 % end
 % encidx = encodings.size - 1
 % lines.each do |line|
-<%=line%>
+<%=line%><%#=%%%>
 % end
 
 #define ENCODING_COUNT <%=count%>
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]