1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-10-23 17:18:51 +02:00
phorge-phorge/webroot/rsrc/externals/javelin/lib
epriestley d280b24239 Fix "arc paste" to stop creating pastes with an empty string ("") as the "language"
Summary:
See PHI652. When you `echo x | arc paste` today, you end up with a Paste object that has the empty string as its "language".

This is normally not valid. Pastes where the language should be autodetected should have the value `null`, not the empty string.

This behavior likely changed when `paste.create` got rewritten in terms of `paste.edit`. Adjust the implementation so it only adds the LANGUAGE transaction if there's an actual language.

Also, fix an issue where you can't use the "delete" key to delete tokens with the empty string as their value.

Test Plan:
  - Created a paste with `echo x | arc paste`, got a paste in autodetect mode instead of with a bogus language value.
  - Created a paste with `echo x | arc paste --lang rainbow`, got a rainbow paste.
  - Deleted an empty string token with the keyboard.
  - Deleted normal tokens with the keyboard.
  - Edited subscribers/etc normally with the keyboard and mouse to make sure I didn't ruin anything.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D19437
2018-05-09 13:22:58 -07:00
..
__tests__ Remove an unused variable 2015-01-20 21:25:40 +11:00
control Fix "arc paste" to stop creating pastes with an empty string ("") as the "language" 2018-05-09 13:22:58 -07:00
behavior.js Remove @group annotations 2014-07-10 08:12:48 +10:00
Cookie.js Fix another undefined variable 2015-01-20 08:55:04 +11:00
DOM.js Move the "select a line range" inline code to DiffInline 2017-05-17 08:41:26 -07:00
History.js Fix an issue with returning to a the initial page in Quicksand 2015-03-28 07:38:14 -07:00
JSON.js Remove @group annotations 2014-07-10 08:12:48 +10:00
Leader.js Decrease JX.Leader lease duration from 16,000ms to 1,500ms and usurp more aggressively 2017-04-17 15:48:47 -07:00
Mask.js Remove @group annotations 2014-07-10 08:12:48 +10:00
Quicksand.js When logged-out users hit a "Login Required" dialog, try to choose a better "next" URI 2015-12-17 08:30:03 -08:00
Request.js Fix various lint issues in rJX 2015-01-14 07:59:56 +11:00
Resource.js Fix various lint issues in rJX 2015-01-14 07:59:56 +11:00
Routable.js Provide a global router for Ajax requests 2014-05-05 10:57:42 -07:00
Router.js Provide a global router for Ajax requests 2014-05-05 10:57:42 -07:00
Scrollbar.js Hide the Differential scroll objective list on trackpad systems 2017-05-20 07:56:21 -07:00
Sound.js Add support for playing sounds 2015-03-10 14:20:00 -07:00
URI.js When logged-out users hit a "Login Required" dialog, try to choose a better "next" URI 2015-12-17 08:30:03 -08:00
Vector.js Fix anchor-clicking scroll positions 2015-01-28 08:26:10 -08:00
WebSocket.js When disconnected from Aphlict after a successful connection, retry the first reconnect right away 2017-04-17 15:53:29 -07:00
Workflow.js accidentally a word 2018-03-22 13:43:10 -07:00