Created
March 1, 2018 21:24
-
-
Save chalkpe/37269152cb57a0ac3f9ae92038dce6ea to your computer and use it in GitHub Desktop.
Atom fix pipeline operator ligatures
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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