Add Abstract: support for howto index generator.
[git.git] / Documentation / howto-index.sh
index 3a6afb9..f9d3e57 100755 (executable)
@@ -20,8 +20,30 @@ do
                s/[     ]*$//
                s/^/by /
                p
+       }
+       ' "$txt"`
+
+       abstract=`sed -ne '
+       /^Abstract:[    ]/{
+               s/^[^   ]*//
+               x
+               s/.*//
+               x
+               : again
+               /^[     ]/{
+                       s/^[    ]*//
+                       H
+                       n
+                       b again
+               }
+               x
+               p
+               q
        }' "$txt"`
-       echo "
-       * link:$txt[$title] $from"
+
+       echo "* link:$txt[$title] $from
+$abstract
+
+"
 
 done