diff --git a/src/functions.rs b/src/functions.rs index 6db5e6b..55b6678 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -344,11 +344,11 @@ impl PostScriptOp { fn write_slice(ops: &[Self], buf: &mut Vec) { buf.push(b'{'); if ops.len() > 1 { - buf.push(b'\n'); + buf.push(b' '); } for op in ops { op.write(buf); - buf.push(b'\n'); + buf.push(b' '); } if ops.len() == 1 { buf.pop(); @@ -358,18 +358,18 @@ impl PostScriptOp { fn write(&self, buf: &mut Vec) { match self { - Self::Real(r) => buf.push_decimal(*r), + Self::Real(r) => buf.push_float(*r), Self::Integer(i) => buf.push_val(*i), Self::If(ops) => { Self::write_slice(&ops, buf); - buf.push(b'\n'); + buf.push(b' '); buf.extend(self.operator()); } Self::IfElse(ops1, ops2) => { Self::write_slice(&ops1, buf); - buf.push(b'\n'); + buf.push(b' '); Self::write_slice(&ops2, buf); - buf.push(b'\n'); + buf.push(b' '); buf.extend(self.operator()); } _ => buf.extend(self.operator()),