You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apex.apache.org by an...@apache.org on 2015/11/13 19:32:45 UTC

incubator-apex-site git commit: fixed indentation problem, bash highlighting, malformed link

Repository: incubator-apex-site
Updated Branches:
  refs/heads/master c8d5f6fcd -> 90b0863c7


fixed indentation problem, bash highlighting, malformed link


Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/commit/90b0863c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/tree/90b0863c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/diff/90b0863c

Branch: refs/heads/master
Commit: 90b0863c7c2476832d7904605174ab3e3b71fb70
Parents: c8d5f6f
Author: Andy Perlitch <an...@datatorrent.com>
Authored: Fri Nov 13 10:32:38 2015 -0800
Committer: Andy Perlitch <an...@datatorrent.com>
Committed: Fri Nov 13 10:32:38 2015 -0800

----------------------------------------------------------------------
 gulpfile.js            | 24 ++++++++++++++++++++++--
 src/less/body.less     |  4 ----
 src/md/contributing.md |  3 +--
 3 files changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-apex-site/blob/90b0863c/gulpfile.js
----------------------------------------------------------------------
diff --git a/gulpfile.js b/gulpfile.js
index aed7406..7a1d122 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -21,8 +21,16 @@ gulp.task('md2html', function() {
   return gulp.src('./src/md/*.md')
     .pipe(marked({
       breaks: true,
-      highlight: function (code) {
-        return require('highlight.js').highlightAuto(code).value;
+      highlight: function (code, lang) {
+        // Only highlight if language was specified and is not bash
+        // (bash highlighting is pretty bad right now in highlightjs)
+        var ignore = ['bash', 'sh', 'zsh'];
+        if (lang && ignore.indexOf(lang) === -1) {
+          return require('highlight.js').highlightAuto(code, [lang]).value;
+        }
+        else {
+          return code;
+        }
       }
     }))
     .pipe(gulp.dest(TEMP_PARTIAL_LOCATION))
@@ -31,6 +39,18 @@ gulp.task('md2html', function() {
     });
 });
 
+// HACK: gulp-compile-handlebars does not allow you to provide compile options.
+// Once https://github.com/kaanon/gulp-compile-handlebars/pull/11 is merged
+// and published to npm, this won't be necessary.
+var originalCompile = handlebars.Handlebars.compile;
+handlebars.Handlebars.compile = function (fileContents, options) {
+  // The preventIndent option is necessary to prevent format issues
+  // that occur with <pre> blocks
+  var newOptions = _.extend({}, options, { preventIndent: true });
+  return originalCompile(fileContents, newOptions);
+};
+
+
 // Builds html files from src/pages
 gulp.task('html', ['md2html'], function() {
 

http://git-wip-us.apache.org/repos/asf/incubator-apex-site/blob/90b0863c/src/less/body.less
----------------------------------------------------------------------
diff --git a/src/less/body.less b/src/less/body.less
index b24e555..35e8bac 100644
--- a/src/less/body.less
+++ b/src/less/body.less
@@ -1,7 +1,3 @@
 body {
   -webkit-font-smoothing: antialiased;
-}
-
-pre code {
-  white-space: pre-line;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-apex-site/blob/90b0863c/src/md/contributing.md
----------------------------------------------------------------------
diff --git a/src/md/contributing.md b/src/md/contributing.md
index a510b4a..788072b 100644
--- a/src/md/contributing.md
+++ b/src/md/contributing.md
@@ -24,8 +24,7 @@ Creating a local branch that tracks a remote makes pull easier (no need to speci
   - Run `mvn license:format -Dlicense.skip=false` to automatically add the header when missing.
 1. Once your feature is complete, submit the pull request on github against `devel-3`.
 1. If you want specific people to review your pull request, use the `@` notation in Github comments to mention that user, and request that he/she reviews your changes.
-1. After all review is complete, combine all new commits into one squashed commit, and include the Jira number in the commit message. There are several ways to squash commits, but [here is one explanation from git-scm.com]
- (https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Squashing-Commits) and a simple example is illustrated below:
+1. After all review is complete, combine all new commits into one squashed commit, and include the Jira number in the commit message. There are several ways to squash commits, but [here is one explanation from git-scm.com](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Squashing-Commits) and a simple example is illustrated below:
 
   If tracking upstream/devel-3 then run `git rebase -i`. Else run `git rebase -i upstream/devel-3`.  
   This command opens the text editor which lists the multiple commits: