diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-09-17 22:22:54 +0200 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-09-17 23:05:27 +0200 |
commit | d6182a3c8fef6377c20bb827a8e86bdac5bfb125 (patch) | |
tree | 3e9e6220e631899670e269521b9be9f13da15fb9 | |
parent | 32d64102cb2f8cf3b0f825f2ac0770563cfb457f (diff) | |
download | pleroma-d6182a3c8fef6377c20bb827a8e86bdac5bfb125.tar.gz |
markdown.ex: Make suggestion(s) plural only if on >1
-rw-r--r-- | lib/pleroma/docs/markdown.ex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/docs/markdown.ex b/lib/pleroma/docs/markdown.ex index 739e4fce3..fc6389064 100644 --- a/lib/pleroma/docs/markdown.ex +++ b/lib/pleroma/docs/markdown.ex @@ -73,13 +73,15 @@ defmodule Pleroma.Docs.Markdown do defp print_suggestions(_file, ""), do: nil defp print_suggestions(file, suggestions) do - IO.write(file, "Suggestions:\n") - if length(suggestions) > 1 do + IO.write(file, "Suggestions:\n") + for suggestion <- suggestions do print_suggestion(file, suggestion, true) end else + IO.write(file, "Suggestion:\n") + print_suggestion(file, List.first(suggestions)) end end |