markdown.ex: Make suggestion(s) plural only if on >1
This commit is contained in:
parent
32d64102cb
commit
d6182a3c8f
@ -73,13 +73,15 @@ defmodule Pleroma.Docs.Markdown do
|
|||||||
defp print_suggestions(_file, ""), do: nil
|
defp print_suggestions(_file, ""), do: nil
|
||||||
|
|
||||||
defp print_suggestions(file, suggestions) do
|
defp print_suggestions(file, suggestions) do
|
||||||
IO.write(file, "Suggestions:\n")
|
|
||||||
|
|
||||||
if length(suggestions) > 1 do
|
if length(suggestions) > 1 do
|
||||||
|
IO.write(file, "Suggestions:\n")
|
||||||
|
|
||||||
for suggestion <- suggestions do
|
for suggestion <- suggestions do
|
||||||
print_suggestion(file, suggestion, true)
|
print_suggestion(file, suggestion, true)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
IO.write(file, "Suggestion:\n")
|
||||||
|
|
||||||
print_suggestion(file, List.first(suggestions))
|
print_suggestion(file, List.first(suggestions))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user