From 49e40db3603f2029ce8c92abaf7f2902b1485cd5 Mon Sep 17 00:00:00 2001 From: tdro Date: Thu, 19 Nov 2020 23:12:55 -0500 Subject: .local/bin/plumber: Single line replace \n --- .local/bin/plumber | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.local') diff --git a/.local/bin/plumber b/.local/bin/plumber index 0c575b9..5d7b0bc 100755 --- a/.local/bin/plumber +++ b/.local/bin/plumber @@ -27,7 +27,9 @@ defmodule TextPlumber do end def singleLineOf(text) do - String.replace(text, "\n", "") |> IO.puts() + String.replace(text, "\n", " ") + |> String.replace(~r/\s\s+/, " ", global: true) + |> IO.puts() end end -- cgit v1.2.3