Add Prettier formatting to README
Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
parent
62158f7d6d
commit
a80970cdc9
2 changed files with 20 additions and 20 deletions
|
@ -128,7 +128,7 @@ julia> cowsay("He mooed we must fight\nEscape or we'll die\nCows gathered around
|
||||||
|| ||
|
|| ||
|
||||||
```
|
```
|
||||||
|
|
||||||
[Julia REPL]: https://docs.julialang.org/en/v1/manual/getting-started/
|
[julia repl]: https://docs.julialang.org/en/v1/manual/getting-started/
|
||||||
[pkg mode]: https://docs.julialang.org/en/v1/stdlib/Pkg/
|
[pkg mode]: https://docs.julialang.org/en/v1/stdlib/Pkg/
|
||||||
[the documentation]: https://millironx.com/Cowsay.jl/stable
|
[the documentation]: https://millironx.com/Cowsay.jl/stable
|
||||||
[unexported Cowfiles]: https://millironx.com/Cowsay.jl/stable/cows/
|
[unexported cowfiles]: https://millironx.com/Cowsay.jl/stable/cows/
|
||||||
|
|
|
@ -166,7 +166,7 @@ function cowmoo(message::AbstractString, mode; kwargs...)
|
||||||
eyes, tongue = construct_face!(eyes, tongue; kwargs...)
|
eyes, tongue = construct_face!(eyes, tongue; kwargs...)
|
||||||
|
|
||||||
# Default to 'say' mode
|
# Default to 'say' mode
|
||||||
if mode ==:think
|
if mode == :think
|
||||||
balloon = thinkballoon
|
balloon = thinkballoon
|
||||||
thoughts = "o"
|
thoughts = "o"
|
||||||
else
|
else
|
||||||
|
@ -284,7 +284,7 @@ function sayballoon(message::AbstractString)
|
||||||
" \\\n"
|
" \\\n"
|
||||||
)
|
)
|
||||||
if nlines > 2
|
if nlines > 2
|
||||||
for i=2:nlines-1
|
for i = 2:nlines-1
|
||||||
balloon = string(
|
balloon = string(
|
||||||
balloon,
|
balloon,
|
||||||
"| ",
|
"| ",
|
||||||
|
@ -321,25 +321,25 @@ function thinkballoon(message::AbstractString)
|
||||||
linelength = max(length.(messagelines)...)
|
linelength = max(length.(messagelines)...)
|
||||||
paddinglength = linelength + 2
|
paddinglength = linelength + 2
|
||||||
|
|
||||||
balloon = string(
|
balloon = string(
|
||||||
" ",
|
" ",
|
||||||
repeat("_", paddinglength),
|
repeat("_", paddinglength),
|
||||||
"\n"
|
"\n"
|
||||||
)
|
)
|
||||||
for i in 1:nlines
|
for i in 1:nlines
|
||||||
balloon = string(
|
|
||||||
balloon,
|
|
||||||
"( ",
|
|
||||||
rpad(messagelines[i], linelength),
|
|
||||||
" )\n"
|
|
||||||
)
|
|
||||||
end #for
|
|
||||||
balloon = string(
|
balloon = string(
|
||||||
balloon,
|
balloon,
|
||||||
" ",
|
"( ",
|
||||||
repeat("-", paddinglength),
|
rpad(messagelines[i], linelength),
|
||||||
"\n"
|
" )\n"
|
||||||
)
|
)
|
||||||
|
end #for
|
||||||
|
balloon = string(
|
||||||
|
balloon,
|
||||||
|
" ",
|
||||||
|
repeat("-", paddinglength),
|
||||||
|
"\n"
|
||||||
|
)
|
||||||
|
|
||||||
return balloon
|
return balloon
|
||||||
end #function
|
end #function
|
||||||
|
|
Loading…
Reference in a new issue