Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
L ldpl
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Lartu
  • ldpl
  • Merge requests
  • !51

Merged
Created Apr 17, 2019 by Lartu@lartu🐕Maintainer

STORE QUOTE syntax for multi-line, literal strings

  • Overview 8
  • Commits 4
  • Changes 2

Created by: dvkt

This is a possible implementation for #12 (closed). Maybe people want to make HTML templates and stuff, well, now they can pretty easily using STORE QUOTE IN $str-var and END QUOTE syntax:

DATA:
content is text

PROCEDURE:
STORE QUOTE IN content
No strings attached! "This is a quote!" I said.
   All the whitespace and whatnot comes, too.

\t\t Nothing is escaped. This \t is just \ and t. 

Everything but the final newline. You've gotta add that, if you want it. -> 
END QUOTE
display "Here's the quote: " crlf content crlf 

Output:

Here's the quote: 
No strings attached! "This is a quote!" I said.
   All the whitespace and whatnot comes, too.

\t\t Nothing is escaped. This \t is just \ and t.

Everything but the final newline. You've gotta add that, if you want it. ->

Notes:

  • Nothing is escaped.
  • There is no final newline, but programs can add it with crlf or somethin'.
  • END QUOTE must be alone on its own line.

Any ideas for better syntax? Or did you envision it as just expanding " to support multi-line strings? I thought about that, but was thinking it would be annoying to escape every ", but maybe it's nice because there's no new syntax.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: github/fork/dvkt/store-quote-in-x