SHARE
TWEET

Untitled

a guest Jun 25th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def logical_lines:
  2.   foreach inputs as $line (
  3.     {buf: [], out: null};
  4.     if (.buf | length) == 0 or ($line | test("^\\s+\\S")) then
  5.       # continuation line
  6.       { buf: (.buf + [$line]), out: null }
  7.     else
  8.       # output line
  9.       { buf: [$line], out: (.buf | join("")) }
  10.     end;
  11.     if .out != null then .out else empty end);
  12.  
  13. logical_lines
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top