]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Docs: Correct indentation of markdown code examples
authornfagerlund <nick.fagerlund@gmail.com>
Wed, 17 Aug 2011 22:20:26 +0000 (15:20 -0700)
committernfagerlund <nick.fagerlund@gmail.com>
Thu, 18 Aug 2011 19:39:04 +0000 (12:39 -0700)
Code examples in several function doc strings were only indented by two
spaces, which would not result in proper display when rendered as HTML. This
commit corrects the indentation to four spaces.

lib/puppet/parser/functions/getvar.rb
lib/puppet/parser/functions/has_key.rb
lib/puppet/parser/functions/loadyaml.rb

index ffd774dbf0290bd4d32f29ed9db6425e0c173861..3ca179f7027582bbd0125f0ec5c71173834586e7 100644 (file)
@@ -5,11 +5,11 @@ module Puppet::Parser::Functions
 
     For example:
 
-      $foo = getvar('site::data::foo')
+        $foo = getvar('site::data::foo')
 
     This is useful if the namespace itself is stored in a string:
 
-      $bar = getvar("${datalocation}::bar")
+        $bar = getvar("${datalocation}::bar")
     ENDHEREDOC
 
     unless args.length == 1
index 9c1c4c3de3f9b3f61b569596aa60a32d652424c8..4657cc29cd875751255dc73e918048815fab491b 100644 (file)
@@ -1,16 +1,17 @@
 module Puppet::Parser::Functions
 
   newfunction(:has_key, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args|
-    determine if a hash has a certain key value.
+    Determine if a hash has a certain key value.
 
     Example:
-      $my_hash = {'key_one' => 'value_one'}
-      if has_key($my_hash, 'key_two') {
-        notice('we will not reach here')
-      }
-      if has_key($my_hash, 'key_one') {
-        notice('this will be printed')
-      }
+
+        $my_hash = {'key_one' => 'value_one'}
+        if has_key($my_hash, 'key_two') {
+          notice('we will not reach here')
+        }
+        if has_key($my_hash, 'key_one') {
+          notice('this will be printed')
+        }
 
     ENDHEREDOC
 
index 0f16f69ea91b2213f993f5be91b26105a2df489c..4ccc95b8cf19dc253272a74083d90dae20c91b5b 100644 (file)
@@ -6,7 +6,7 @@ module Puppet::Parser::Functions
 
     For example:
 
-      $myhash = loadyaml('/etc/puppet/data/myhash.yaml')
+        $myhash = loadyaml('/etc/puppet/data/myhash.yaml')
     ENDHEREDOC
 
     unless args.length == 1