allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hei...@apache.org
Subject [4/6] allura git commit: [#8040] remove customizations now that we have standard block rendering on the backend
Date Thu, 28 Apr 2016 20:15:08 GMT
[#8040] remove customizations now that we have standard block rendering on the backend


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/2b720764
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/2b720764
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/2b720764

Branch: refs/heads/master
Commit: 2b72076434dfa3f4a9611feba5c97c4cb63e0b80
Parents: ec3cf88
Author: Dave Brondsema <dave@brondsema.net>
Authored: Tue Jan 19 16:47:50 2016 -0500
Committer: Heith Seewald <heiths@gmail.com>
Committed: Thu Apr 28 16:08:49 2016 -0400

----------------------------------------------------------------------
 Allura/allura/lib/widgets/resources/js/sf_markitup.js | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/2b720764/Allura/allura/lib/widgets/resources/js/sf_markitup.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/sf_markitup.js b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
index 580c709..58593ce 100644
--- a/Allura/allura/lib/widgets/resources/js/sf_markitup.js
+++ b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
@@ -149,11 +149,11 @@ $(window).load(function() {
                 }
               }
 
-              function insertFencingAtSelection(cm, cur_start, cur_end, fenceCharsToInsert,
inverse) {  // FIXME inverse is just for us
+              function insertFencingAtSelection(cm, cur_start, cur_end, fenceCharsToInsert)
{
                 var start_line_sel = cur_start.line + 1,
                   end_line_sel = cur_end.line + 1,
                   sel_multi = cur_start.line !== cur_end.line,
-                  repl_start = (inverse?'':'\n') + fenceCharsToInsert + '\n',  // FIXME extra
leading \n for us
+                  repl_start = fenceCharsToInsert + '\n',
                   repl_end = '\n' + fenceCharsToInsert;
                 if (sel_multi) {
                   end_line_sel++;
@@ -163,11 +163,6 @@ $(window).load(function() {
                   repl_end = fenceCharsToInsert + '\n';
                   end_line_sel--;
                 }
-                if (inverse) {
-                  repl_end = '\n' + repl_end; // FIXME extra leading \n for us
-                } else {
-                  start_line_sel++; end_line_sel++; // FIXME because of first extra leading
\n for us
-                }
                 _replaceSelection(cm, false, repl_start, repl_end);
                 cm.setSelection({line: start_line_sel, ch: 0},
                                 {line: end_line_sel, ch: 0});
@@ -208,7 +203,7 @@ $(window).load(function() {
                     }
                   }
                   var fencedTok = cm.getTokenAt({line: block_start, ch: 1});
-                  insertFencingAtSelection(cm, cur_start, cur_end, fencedTok.state.base.fencedChars,
true);
+                  insertFencingAtSelection(cm, cur_start, cur_end, fencedTok.state.base.fencedChars);
                 } else {
                   // no selection, search for ends of this fenced block
                   var search_from = cur_start.line;


Mime
View raw message