Skip to content

Instantly share code, notes, and snippets.

@chalkpe
Created March 1, 2018 21:24
Show Gist options
  • Save chalkpe/37269152cb57a0ac3f9ae92038dce6ea to your computer and use it in GitHub Desktop.
Save chalkpe/37269152cb57a0ac3f9ae92038dce6ea to your computer and use it in GitHub Desktop.
Atom fix pipeline operator ligatures
selector = '.syntax--keyword.syntax--operator.syntax--bitwise.syntax--js'
atom.workspace.observeTextEditors (editor) ->
editor.onDidChange ->
pipes = document.querySelectorAll selector
Array.from(pipes).forEach (pipe) ->
return if not pipe or pipe.textContent != '|'
next = pipe.nextSibling
return if not next or next.textContent != '>'
pipe.textContent = '|>'
next.textContent = ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment