tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkupp...@apache.org
Subject [5/5] tinkerpop git commit: Simplified the pre-processor's prettify script.
Date Wed, 07 Sep 2016 22:36:44 GMT
Simplified the pre-processor's prettify script.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/08a780fd
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/08a780fd
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/08a780fd

Branch: refs/heads/master
Commit: 08a780fd496e1ef93d1b8ba9d2cd8a500cc201a1
Parents: 7c39c1c
Author: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Authored: Wed Sep 7 23:54:50 2016 +0200
Committer: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Committed: Thu Sep 8 00:35:32 2016 +0200

----------------------------------------------------------------------
 docs/preprocessor/awk/prettify.awk | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/08a780fd/docs/preprocessor/awk/prettify.awk
----------------------------------------------------------------------
diff --git a/docs/preprocessor/awk/prettify.awk b/docs/preprocessor/awk/prettify.awk
index f115ec5..cbaa12f 100644
--- a/docs/preprocessor/awk/prettify.awk
+++ b/docs/preprocessor/awk/prettify.awk
@@ -21,14 +21,8 @@
 /^==>\/\/\/\/$/ { doPrint = 1 }
 
 {
-  lastLineStartedWithGremlin = lastLineStartedWithGremlin && inCodeSection
-  if (inCodeSection) {
-    if ($0 ~ /^gremlin> / && ($0 ~ /([.,({]|""")(\s*\/\/.*)?$/ || $0 ~ /^gremlin>
 /)) {
-      if (lastLineStartedWithGremlin) gsub(/^gremlin> /, "         ")
-      lastLineStartedWithGremlin = 1
-    } else {
-      lastLineStartedWithGremlin = 0
-    }
+  if (inCodeSection && $0 ~ /^\.*[0-9]+> /) {
+    gsub(/^.{8}/, "        ")
   }
   if (doPrint) print
 }


Mime
View raw message