You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2016/01/26 22:52:47 UTC
[3/7] allura git commit: [#8040] remove customizations now that we
have standard block rendering on the backend
[#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/6ccfba2f
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/6ccfba2f
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/6ccfba2f
Branch: refs/heads/db/8040
Commit: 6ccfba2fc4b4b46fe2c166bf5a383db314028416
Parents: 2dd2ff0
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Jan 19 16:47:50 2016 -0500
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Mon Jan 25 17:51:36 2016 -0500
----------------------------------------------------------------------
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/6ccfba2f/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;