Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Literal attribute type #13

Merged
merged 1 commit into from
May 29, 2019
Merged

Conversation

luksa
Copy link
Contributor

@luksa luksa commented May 29, 2019

RawString allows clients to circumvent golang's escape logic.

Before this commit, it was impossible to left- or right-justify text, as
the escape sequences \l and \r were escaped to \l and \r by printf("%q").

@emicklei
Copy link
Owner

thank you for your contributions. could you also provide the relevant unit tests for them?

@luksa luksa changed the title Introduce RawString attribute type Introduce Literal attribute type May 29, 2019
@luksa
Copy link
Contributor Author

luksa commented May 29, 2019

@emicklei I've now changed it to Literal instead of RawString, since this has broader applicability. I've also added a test.

Literal allows clients to circumvent golang's string escaping logic.

Before this commit, it was impossible to left- or right-justify text, as
the escape sequences \l and \r were escaped to \\l and \\r by printf("%q").
@emicklei emicklei merged commit b88cb56 into emicklei:master May 29, 2019
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.

2 participants