Please review pull request #46: Fixed #7022 - Added explanation of single-quoted string escaping opened by (jamtur01)

Description:

The current single-quoted string escaping matches the Ruby language
behavior. It has been determined that this is the correct behavior and
is now documented in the Language Guide.

  • Opened: Sat Jan 21 16:43:24 UTC 2012
  • Based on: puppetlabs:master (7688f61d36a4f2cf1a60e6dd6fa456eff1e7e320)
  • Requested merge: jamtur01:tickets/master/7022 (457e3e54c021b22edce9f9418fbeac35259441e9)

Diff follows:

diff --git a/source/guides/language_guide.markdown b/source/guides/language_guide.markdown
index d4e6cb6..ea8317d 100644
--- a/source/guides/language_guide.markdown
+++ b/source/guides/language_guide.markdown
@@ -705,6 +705,9 @@ not single quotes.   Single-quoted strings will not do any variable interpolatio
 To put a quote character or `$` in a double-quoted string where it would
 normally have a special meaning, precede it with an escaping `\`. For an actual `\`, use `\\`.
 
+In single-quoted strings only two escape sequences are supported, `\'`
+for single quote and `\\` for single backslash. Except for these two escape sequences, everything else between single quotes is treated literally.
+
 We recommend using single quotes for all strings that do not require variable interpolation. Use double quotes for those strings that require variable interpolation.  The [Style Guide](./style_guide.html#quoting) also discusses this with examples.
 
 ### Capitalization

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to