1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00
joplin/packages/app-cli/tests/html_to_md/code_multiline_1.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

403 B

const bubbleSort = (originalArray) => {
	  let swapped = false
	
	  const a = [...originalArray]
	
	  for (let i = 1; i < a.length - 1; i++) {
	    swapped = false
	
	    for (let j = 0; j < a.length - i; j++) {
	      if (a[j + 1] < a[j]) {
	        ;[a[j], a[j + 1]] = [a[j + 1], a[j]]
	        swapped = true
	      }
	    }
	
	    if (!swapped) {
	      return a
	    }
	  }
	
	  return a
	}