Kviečiu išmąstyti ir puoselėti bendrystę ugdytis, bręsti, gyventi amžinai jau čia ir dabar. Pavaizdavimai? E6E6FF Asmeniškai? BA9696 Darbai FFFFC0 Išsiaiškinimai D8F1D8 Užrašai EEEEEE Kitų mintys? ECD9EC Dievas man? FFECC0 Mieli dalyviai! Visa mano kūryba ir kartu visi šie puslapiai yra visuomenės turtas, kuriuo visi kviečiami laisvai naudotis, dalintis, visaip perkurti. - Andrius |
administrators (intermediate)
IntroductionPmWiki's markup translation engine is handled by a set of rules; each rule searches for a specific pattern in the markup text and replaces it with some replacement text. Internally, this is accomplished by using PHP's "preg_replace" function. Rules are added to the translation engine via PmWiki's Markup() function, which looks like Markup($name, $when, $pattern, $replace);
where For example, here's the code that creates the rule for Markup("em", "inline", "/''(.*?)''/", "<em>$1</em>");
Basically this statement says to create a rule called "em" to be performed with the other "inline" markups, and the rule replaces any text inside two pairs of single quotes with the same text match not begin/end of strings but also begin/end of lines (i.e., right before/after a newline). How do I get started writing recipes and creating my own custom markup? (alternate) Introduction to custom markup for Beginners This page may have a more recent version on pmwiki.org: PmWiki:CustomMarkup, and a talk page: PmWiki:CustomMarkup-Talk. |
CustomMarkupNaujausi pakeitimai |
Puslapis paskutinį kartą pakeistas 2010 sausio 28 d., 22:29
|