Skip to content

Commit 4e190e5

Browse files
committed
fix the indent of moduledoc in Module
1 parent 14610cb commit 4e190e5

File tree

1 file changed

+66
-66
lines changed

1 file changed

+66
-66
lines changed

lib/elixir/lib/module.ex

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ defmodule Module do
115115
116116
### Example
117117
118-
defmodule M do
119-
@compile {:inline, myfun: 1}
118+
defmodule M do
119+
@compile {:inline, myfun: 1}
120120
121-
def myfun(arg) do
122-
to_string(arg)
123-
end
121+
def myfun(arg) do
122+
to_string(arg)
124123
end
124+
end
125125
126126
* `@doc`
127127
@@ -136,19 +136,19 @@ defmodule Module do
136136
137137
### Example
138138
139-
defmodule M do
140-
@doc "Hello world"
141-
def hello do
142-
"world"
143-
end
139+
defmodule M do
140+
@doc "Hello world"
141+
def hello do
142+
"world"
143+
end
144144
145-
@doc """
146-
Sums `a` to `b`.
147-
"""
148-
def sum(a, b) do
149-
a + b
150-
end
145+
@doc """
146+
Sums `a` to `b`.
147+
"""
148+
def sum(a, b) do
149+
a + b
151150
end
151+
end
152152
153153
* `@file`
154154
@@ -159,13 +159,13 @@ defmodule Module do
159159
160160
### Example
161161
162-
defmodule M do
163-
@doc "Hello world"
164-
@file "hello.ex"
165-
def hello do
166-
"world"
167-
end
162+
defmodule M do
163+
@doc "Hello world"
164+
@file "hello.ex"
165+
def hello do
166+
"world"
168167
end
168+
end
169169
170170
* `@moduledoc`
171171
@@ -177,11 +177,11 @@ defmodule Module do
177177
178178
### Example
179179
180-
defmodule M do
181-
@moduledoc """
182-
A very useful module
183-
"""
184-
end
180+
defmodule M do
181+
@moduledoc """
182+
A very useful module
183+
"""
184+
end
185185
186186
187187
* `@on_definition`
@@ -216,28 +216,28 @@ defmodule Module do
216216
217217
### Example
218218
219-
defmodule H do
220-
def on_def(_env, kind, name, args, guards, body) do
221-
IO.puts "Defining #{kind} named #{name} with args:"
222-
IO.inspect args
223-
IO.puts "and guards"
224-
IO.inspect guards
225-
IO.puts "and body"
226-
IO.puts Macro.to_string(body)
227-
end
219+
defmodule H do
220+
def on_def(_env, kind, name, args, guards, body) do
221+
IO.puts "Defining #{kind} named #{name} with args:"
222+
IO.inspect args
223+
IO.puts "and guards"
224+
IO.inspect guards
225+
IO.puts "and body"
226+
IO.puts Macro.to_string(body)
228227
end
228+
end
229229
230-
defmodule M do
231-
@on_definition {H, :on_def}
230+
defmodule M do
231+
@on_definition {H, :on_def}
232232
233-
def hello(arg) when is_binary(arg) or is_list(arg) do
234-
"Hello" <> to_string(arg)
235-
end
233+
def hello(arg) when is_binary(arg) or is_list(arg) do
234+
"Hello" <> to_string(arg)
235+
end
236236
237-
def hello(_) do
238-
:ok
239-
end
237+
def hello(_) do
238+
:ok
240239
end
240+
end
241241
242242
* `@on_load`
243243
@@ -249,31 +249,31 @@ defmodule Module do
249249
250250
### Example
251251
252-
defmodule M do
253-
@on_load :load_check
252+
defmodule M do
253+
@on_load :load_check
254254
255-
def load_check do
256-
if some_condition() do
257-
:ok
258-
else
259-
nil
260-
end
255+
def load_check do
256+
if some_condition() do
257+
:ok
258+
else
259+
nil
261260
end
261+
end
262262
263-
def some_condition do
264-
false
265-
end
263+
def some_condition do
264+
false
266265
end
266+
end
267267
268268
* `@vsn`
269269
270270
Specify the module version. Accepts any valid Elixir value.
271271
272272
### Example
273273
274-
defmodule M do
275-
@vsn "1.0"
276-
end
274+
defmodule M do
275+
@vsn "1.0"
276+
end
277277
278278
* `@external_resource`
279279
@@ -301,13 +301,13 @@ defmodule Module do
301301
302302
### Example
303303
304-
defmodule M do
305-
@dialyzer {:nowarn_function, myfun: 1}
304+
defmodule M do
305+
@dialyzer {:nowarn_function, myfun: 1}
306306
307-
def myfun(arg) do
308-
M.not_a_function(arg)
309-
end
307+
def myfun(arg) do
308+
M.not_a_function(arg)
310309
end
310+
end
311311
312312
The following attributes are part of typespecs and are also reserved by
313313
Elixir (see `Kernel.Typespec` for more information about typespecs):
@@ -323,9 +323,9 @@ defmodule Module do
323323
also be added. A custom attribute is any valid identifier prefixed with an
324324
`@` and followed by a valid Elixir value:
325325
326-
defmodule M do
327-
@custom_attr [some: "stuff"]
328-
end
326+
defmodule M do
327+
@custom_attr [some: "stuff"]
328+
end
329329
330330
For more advanced options available when defining custom attributes, see
331331
`register_attribute/3`.

0 commit comments

Comments
 (0)