Skip to content

Instantly share code, notes, and snippets.

@josefglatz
Last active October 29, 2015 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josefglatz/9960496 to your computer and use it in GitHub Desktop.
Save josefglatz/9960496 to your computer and use it in GitHub Desktop.
Testing new TYPO3 CMS 6.2 stdWrap replacement option "useOptionSplitReplace"
plugin.tx_imagecycle_pi3.nivo.normal.captionWrap {
stdWrap {
replacement {
// replaces first pipe to <h2> (opening tag)
// replaces second pipe to </h2> (closing tag)
10 {
search = #[|]#i
replace = <h2> || </h2>
useOptionSplitReplace = 1
useRegExp = 1
}
// replaces two space characters with a linebreak
20 {
search = #\s{2}#i
replace = <br>
useRegExp = 1
}
// replaces + or + to <b> tags
30 {
search = #\+{1}#i
replace = <b> || </b>
useOptionSplitReplace = 1
useRegExp = 1
}
// replaces |sub| with <sub> open-/end-tag
40 {
search = #(\|sub\|)#i
replace = <sub> || </sub>
useOptionSplitReplace = 1
useRegExp = 1
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment