Skip to content

docs: clarify quote/squote escaping behavior#483

Open
Solaris-star wants to merge 1 commit into
Masterminds:masterfrom
Solaris-star:docs/481-quote-escape-docs
Open

docs: clarify quote/squote escaping behavior#483
Solaris-star wants to merge 1 commit into
Masterminds:masterfrom
Solaris-star:docs/481-quote-escape-docs

Conversation

@Solaris-star

Copy link
Copy Markdown

Description

The docs for quote / squote only said they wrap a string in quotes. quote actually uses Go's %q verb (fmt.Sprintf("%q", ...)), so contents are escaped with Go string syntax. squote only adds surrounding single quotes without that escaping.

Fix

Expand the quote and squote section in docs/strings.md to describe escaping behavior and give simple examples.

Linked Issue

Closes #481

Document that quote uses Go %q escaping (not only wrapping) and that
squote only adds surrounding single quotes without Go string escaping.

Fixes Masterminds#481
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve docs of quote functions

1 participant