Procházet zdrojové kódy

cats generator removes trailing spaces;

bjorn před 6 měsíci
rodič
revize
4fcbe70e47
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      api/generators/cats.lua

+ 1 - 1
api/generators/cats.lua

@@ -68,7 +68,7 @@ end
 --- contains newlines, they are prefixed with `---`.
 local function doc(str)
   str = str or ""
-  return "---" .. str:gsub("\n", "\n---")
+  return "---" .. str:gsub("\n", "\n---"):gsub('%s*$', '')
 end
 
 --- Determines if a parameter is optional. If it is, returns a `?` suffix.