Feature #7552

Implement multiline string support

Added by Robert Lemke over 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-04-30
Priority:Should have Due date:
Assigned To:Tobias Liebig % Done:

100%

Category:-
Target version:-

Description

This should be possible:

foo = Text
foo.value = " The text starts at this line
   ...
   and ends a few lines later. " 

patch_7552.diff Magnifier (5.7 kB) Tobias Liebig, 2010-06-14 14:02

Associated revisions

Revision f2e8eee2
Added by Robert Lemke over 5 years ago

[~TASK] TypoScript (Parser): Removed usage of Object Factory and the old Object Manager API
[~TASK] TypoScript (Parser): Wrote fixture and test case for multiline string support - however, the actual support for it is still missing. Relates to #7552

Revision 2f8c4b0b
Added by Tobias Liebig about 5 years ago

[+FEATURE] TypoScript: Implement multiline string support. resolves #7552

History

#1 Updated by Robert Lemke about 5 years ago

  • Assigned To changed from Robert Lemke to Tobias Liebig

#2 Updated by Tobias Liebig about 5 years ago

  • % Done changed from 0 to 50

#3 Updated by Tobias Liebig about 5 years ago

i've created a patch to implement multiline strings in typoscript.

If the parser detects the beginning of a multiline string value, it will step forward till it finds the matching closing quote char (" or ').
Due to that i needed to change how the parser iterates through the lines of TypoScript.
If i'm right $this->currentSourceCodeLines was meant for that, but not used till now.

#4 Updated by Sebastian Kurfuerst about 5 years ago

Hey Tobi,

I just had a quick look through your patch, and these are my comments:

That's it from my side :) Didn't test the patch, but they are just some cosmetical remarks I had.

Greets, and thanks for your nice work!
Sebastian

#5 Updated by Tobias Liebig about 5 years ago

@sebastian: good advice. I like the formatting of the RegExps. This should be done for all regexps in the parser (which then is a new task).

#6 Updated by Robert Lemke about 5 years ago

Hi Tobi,

I had problems applying the patch but generally it looks good.

Generally we use inline comments very sparingly, so I think that "increase the pointer" is unnecessary in this case. If you feel like adding an inline comment that usually is a sign to extract the behavior into its own method and use a meaningful method name for a better explanation. Anyway, I think in this case the code is obvious enough.

Please commit your patch (after naming the regex parameters - see Sebastians comment) and then I'll try it out again.

#7 Updated by Tobias Liebig about 5 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 70 to 100

Applied in changeset r4584.

Also available in: Atom PDF