Skip to content

Commit ae3e3ae

Browse files
committed
format(TypeFields): no newline after fieldname
fixes #63
1 parent 7c169bc commit ae3e3ae

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/abbreviations.jl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,9 @@ type `Vector{Any}`.
8181
8282
- `x::String`
8383
84-
- `y::Int`
84+
- `y::Int`: Unlike the `x` field this field has been documented.
8585
86-
Unlike the `x` field this field has been documented.
87-
88-
- `z::Array{Any, 1}`
89-
90-
Another documented field.
86+
- `z::Array{Any, 1}`: Another documented field.
9187
```
9288
"""
9389
const TYPEDFIELDS = TypeFields(true)
@@ -105,9 +101,11 @@ function format(abbrv::TypeFields, buf, doc)
105101
println(buf, "`")
106102
# Print the field docs if they exist and aren't a `doc"..."` docstring.
107103
if haskey(docs, field) && isa(docs[field], AbstractString)
108-
println(buf)
104+
print(buf, ": ")
105+
indented = true
109106
for line in split(docs[field], "\n")
110-
println(buf, isempty(line) ? "" : " ", rstrip(line))
107+
println(buf, indented || isempty(line) ? "" : " ", rstrip(line))
108+
indented = false
111109
end
112110
end
113111
println(buf)

0 commit comments

Comments
 (0)