@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Quoted text remarkup should be smart enough to know when to add a '>' and when to add '> '

Summary: Fixes T8565, Quoted text remarkup should be smart enough to know when to add a '>' and when to add '> '

Test Plan: Open an object with remarkup comments, add 'quote', select that text click the quote button in the remarkup menu, text should become '> quote'. Select and click again, text should become '>> quote'.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8565

Differential Revision: https://secure.phabricator.com/D13334

+28 -16
+12 -12
resources/celerity/map.php
··· 8 8 return array( 9 9 'names' => array( 10 10 'core.pkg.css' => 'd7ecac6d', 11 - 'core.pkg.js' => '288f6571', 11 + 'core.pkg.js' => 'e0117d99', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '02273347', 14 14 'differential.pkg.js' => 'ebef29b1', ··· 460 460 'rsrc/js/core/behavior-object-selector.js' => '49b73b36', 461 461 'rsrc/js/core/behavior-oncopy.js' => '2926fff2', 462 462 'rsrc/js/core/behavior-phabricator-nav.js' => '14d7a8b8', 463 - 'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => '095ed313', 463 + 'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => 'eeaa9e5a', 464 464 'rsrc/js/core/behavior-refresh-csrf.js' => '7814b593', 465 465 'rsrc/js/core/behavior-remarkup-preview.js' => 'f7379f45', 466 466 'rsrc/js/core/behavior-reorder-applications.js' => '76b9fc3e', ··· 611 611 'javelin-behavior-phabricator-notification-example' => '8ce821c5', 612 612 'javelin-behavior-phabricator-object-selector' => '49b73b36', 613 613 'javelin-behavior-phabricator-oncopy' => '2926fff2', 614 - 'javelin-behavior-phabricator-remarkup-assist' => '095ed313', 614 + 'javelin-behavior-phabricator-remarkup-assist' => 'eeaa9e5a', 615 615 'javelin-behavior-phabricator-reveal-content' => '60821bc7', 616 616 'javelin-behavior-phabricator-search-typeahead' => '048330fa', 617 617 'javelin-behavior-phabricator-show-older-transactions' => 'dbbf48b6', ··· 883 883 'javelin-install', 884 884 'javelin-dom', 885 885 'javelin-stratcom', 886 - 'javelin-vector', 887 - ), 888 - '095ed313' => array( 889 - 'javelin-behavior', 890 - 'javelin-stratcom', 891 - 'javelin-dom', 892 - 'phabricator-phtize', 893 - 'phabricator-textareautils', 894 - 'javelin-workflow', 895 886 'javelin-vector', 896 887 ), 897 888 '0a3f3021' => array( ··· 1947 1938 'javelin-aphlict', 1948 1939 'phabricator-phtize', 1949 1940 'javelin-dom', 1941 + ), 1942 + 'eeaa9e5a' => array( 1943 + 'javelin-behavior', 1944 + 'javelin-stratcom', 1945 + 'javelin-dom', 1946 + 'phabricator-phtize', 1947 + 'phabricator-textareautils', 1948 + 'javelin-workflow', 1949 + 'javelin-vector', 1950 1950 ), 1951 1951 'efe49472' => array( 1952 1952 'javelin-install',
+16 -4
webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js
··· 99 99 } else { 100 100 sel = [def]; 101 101 } 102 - sel = sel.join('\n' + ch); 103 - return sel; 102 + 103 + if (ch === '>') { 104 + for(var i=0; i < sel.length; i++) { 105 + if (sel[i][0] === '>') { 106 + ch = '>'; 107 + } else { 108 + ch = '> '; 109 + } 110 + sel[i] = ch + sel[i]; 111 + } 112 + return sel.join('\n'); 113 + } 114 + 115 + return sel.join('\n' + ch); 104 116 } 105 117 106 118 function assist(area, action, root) { ··· 141 153 update(area, code_prefix + '```\n', sel, '\n```'); 142 154 break; 143 155 case 'fa-quote-right': 144 - ch = '> '; 156 + ch = '>'; 145 157 sel = prepend_char_to_lines(ch, sel, pht('Quoted Text')); 146 - update(area, ((r.start === 0) ? '' : '\n\n') + ch, sel, '\n\n'); 158 + update(area, ((r.start === 0) ? '' : '\n\n'), sel, '\n\n'); 147 159 break; 148 160 case 'fa-table': 149 161 var table_prefix = (r.start === 0 ? '' : '\n\n');