summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2009-01-22 10:39:49 +1100
committerJames Turnbull <james@lovedthanlost.net>2009-01-22 10:39:49 +1100
commitfb8f8cd14f2a4958505f27910ad1d2a368bb0967 (patch)
treebdc3e121dfccc94d98a2300b682ccbcb651d1be5
parent69432d6f1dda6a59a015bcd30a729524e3655fd3 (diff)
downloadpuppet-fb8f8cd14f2a4958505f27910ad1d2a368bb0967.tar.gz
puppet-fb8f8cd14f2a4958505f27910ad1d2a368bb0967.tar.xz
puppet-fb8f8cd14f2a4958505f27910ad1d2a368bb0967.zip
In order for ReST formatting to work properly, newlines and
indentation of doc strings must be retained. Signed-off-by: Thomas Bellman <bellman@nsc.liu.se>
-rw-r--r--CHANGELOG2
-rw-r--r--lib/puppet/parser/functions.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 4e7da98ac..9ae21e8da 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,6 @@
0.25.0
+ Doc strings update for REST
+
Fixed #1840 - Bug fixes and improvements for Emacs puppet-mode.el
Updated Red Hat spec file 0.24.7
diff --git a/lib/puppet/parser/functions.rb b/lib/puppet/parser/functions.rb
index b1cd0d083..b9e49131c 100644
--- a/lib/puppet/parser/functions.rb
+++ b/lib/puppet/parser/functions.rb
@@ -92,7 +92,7 @@ module Functions
#ret += "%s\n%s\n" % [name, hash[:type]]
ret += "%s\n%s\n" % [name, "-" * name.to_s.length]
if hash[:doc]
- ret += hash[:doc].gsub(/\n\s*/, ' ')
+ ret += Puppet::Util::Docs.scrub(hash[:doc])
else
ret += "Undocumented.\n"
end