Oznámení

Provoz fóra byl ukončen

Macros

před 12 lety

markus
Člen | 11

Imagine that we have a property $texy->macros (it is an array).
Something like this:

$texy->macros = array('macro1'=>'Some text','macro2'=>'Some another text');

Next we want to make texy execute the following:
replace -=macro1=- with ‚Some text‘ and -=macro2=- with ‚Some another text‘

How can i achieve this functionality?

For example we have a text:

Bla bla bla -=macro1=- this is a test. Hello world.

Texy has to generate such output:

Bla bla bla Some text this is a test. Hello world.