Feature #7552

Implement multiline string support

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

Status:
Resolved
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2010-04-30
Due date:
% Done:

100%


Description

This should be possible:

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

patch_7552.diff View (5.72 KB) Tobias Liebig, 2010-06-14 14:02

Associated revisions

Revision f2e8eee2 (diff)
Added by Robert Lemke over 9 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 (diff)
Added by Tobias Liebig over 9 years ago

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

History

#1 Updated by Robert Lemke over 9 years ago

  • Assignee changed from Robert Lemke to Tobias Liebig

#2 Updated by Tobias Liebig over 9 years ago

  • % Done changed from 0 to 50

#3 Updated by Tobias Liebig over 9 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 over 9 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 over 9 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 over 9 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 over 9 years ago

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

Applied in changeset r4584.

Also available in: Atom PDF