1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-27 10:32:58 +02:00
joplin/packages/app-cli/tests/html_to_md/code_multiline_4.md
wljince007 294cc4a440
Desktop: Fixes #5626: When web clipper clipping code blocks, keep code in multiline and delete code number lines (#10126)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
Co-authored-by: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com>
2024-04-20 13:48:44 +01:00

322 B

let str = `   hello world  !  `;
let _trim = function () {
  if (typeof this == "number") new Error("Invalid or unexpected token");
  if (typeof this !== "string")
    new Error("Cannot read property 'trim' of" + this);
  let reg = /^\s*|\s*$/g;
  return this.replace(reg, "");
};
 
String.prototype._trim = _trim;