summaryrefslogtreecommitdiff
path: root/inc/parser/handler.php
Commit message (Collapse)AuthorAge
...
* removed some illogical path setupsAndreas Gohr2008-12-13
| | | | darcs-hash:20081213090400-7ad00-4e21cd75978bb07513f32f5d750658e8d777c59e.gz
* parser: put match on the call stackpierre.spring2008-10-22
| | | | darcs-hash:20081022140209-c07ef-c4d27f3c581ee6ee7cedb886f9e5b2675503b817.gz
* syntax plugin match getter and setterpierre.spring2008-08-29
| | | | darcs-hash:20080829125828-c07ef-b27cbac1f23e313572952ea8f1172fbd88f60493.gz
* Allow syntax plugin handle() function to return false to indicate do not ↵Chris Smith2008-08-13
| | | | | | create plugin render instruction darcs-hash:20080813125334-f07c6-dc93aefae6f027152a7bded7f0dacc814d041566.gz
* allow numbers in interwiki descriptors FS#1358Andreas Gohr2008-03-25
| | | | darcs-hash:20080325185208-7ad00-d5181f3d82f89f6ed1d4ca9068db4123df8d443b.gz
* update preformatted syntax mode to ignore entire blocks of white spaceChris Smith2008-03-13
| | | | | | | | | | This patch only updates the actual "preformatted" syntax mode, that is only preformatted blocks caused by leading blanks on a line. If the entire block is empty, it is ignored. ie. if a block of preformatted text has leading or trailing empty lines and some non-empty lines, the leading and trailing content are preserved. darcs-hash:20080313203950-f07c6-9d0745b157e45b61b06ff0c7d85bec8558946c1e.gz
* change line-break replacement character to '\n'Chris Smith2008-03-12
| | | | | | | | | | | | | | | | | This patch is the third in a series aimed at making it easier for DW to allow plugins to modify the standard handling of line-breaks. It effectively leaves the new-line character '\n' in the 'cdata' instruction allowing the renderer to process the character as it chooses. No changes have been made to the renderers. This change is neutral to xhtml renderers as xhtml treats spaces and new-lines identically (as white-space). Writers of renderer plugins are advised to check their plugin against the new patch. darcs-hash:20080312000924-f07c6-a6dab2d16c7bc42e9dc8eb137648c6f984b4f2e6.gz
* Update handler to merge consecutive 'cdata' instructions (incl. test case ↵Chris Smith2008-03-12
| | | | | | | | | | | | | updates) This patch is the second in the series designed to make it easier for DW to allow plugins to modify the standard handling of line-breaks. Like the first this patch doesn't alter line-break behaviour at all, but introduces improvements that reduce to a minimum the number of 'cdata' instructions generated by the handler. darcs-hash:20080312000248-f07c6-f6ce1b5aac43a52cbe31215c517b048679ae20a7.gz
* Change handler to use a defined character for line-break replacementChris Smith2008-03-09
| | | | | | | | | | | | | This patch is the first in a series aimed at making it easier for DW to allow plugins to modify the standard handling of line-breaks. Currently the handler "eats" line-break characters replacing them with a space. This patch changes the replacement character to a define, DOKU_PARSER_EOL and updates all the test cases to use the new define. DOKU_PARSER_EOL is left as a space. darcs-hash:20080309201116-f07c6-21edb4f6955da8fa5ba0f9346d859a7c5c69a239.gz
* renamed justlink option to linkonlyAndreas Gohr2008-02-23
| | | | darcs-hash:20080223101426-7ad00-ceacdc83e829f1da7aa272eb597277a8c78113be.gz
* media_justlinkPierre Spring2008-02-21
| | | | darcs-hash:20080221160833-c3d3e-1afe0835f9ba1af27712bd34e8b0b65e6165284f.gz
* Rationalise Parser PHP & HTML syntax mode handling to renderer only.Chris Smith2008-02-13
| | | | | | | | | | | | | | This patch corrects the problems with the previously (reversed) patch "remove htmlok and phpok tests from Doku_Handler". The handler will now write php, phpblock, html & htmlblock instructions and let the renderer decide how these instructions should be processed. The xhtml renderer will follow the "phpok" and "htmlok" config settings. If these settings are turned off the any instructions will be rendered as code with php or html syntax highlighting (as appropriate). darcs-hash:20080213024941-d26fc-ec485362803e63a2d949dad5c23e17db939e6ced.gz
* UNDO: remove htmlok and phpok tests from Doku_HandlerSpring Pierre2008-01-17
| | | | | | | | | there is no necessity for the "htmlok" and "phpok" testing in the Doku_Handler, taken the fact that the page renderer does it too. and it gives the possibility to the renderer to choose, what to do with such blocks. darcs-hash:20080117222648-01292-c4b5a890ada5e5e962ba7e3f62c4c2fc5d72138f.gz
* remove htmlok and phpok tests from Doku_HandlerSpring Pierre2008-01-17
| | | | | | | | | there is no necessity for the "htmlok" and "phpok" testing in the Doku_Handler, taken the fact that the page renderer does it too. and it gives the possibility to the renderer to choose, what to do with such blocks. darcs-hash:20080117222648-01292-cfce862d4e6fe9ce61feda7d6f11f014a68f5ffa.gz
* don't use realpath() anymore (FS#1261 and others)Andreas Gohr2007-09-30
| | | | | | | | | | | The use of realpath() to clean up relative file names caused some trouble in certain setups relying on symlinks or having restricitve file structure setups. This patch replaces all realpath() calls with a PHP only replacement which should solve those problems. darcs-hash:20070930184250-7ad00-512ff04c95f57fc9eaf104f80372237a3c94286f.gz
* added block mode for embedded html+php (FS#541) -- same syntax but in ↵Anika Henke2007-05-18
| | | | | | capital letters (<HTML>+<PHP>) darcs-hash:20070517233213-d5083-9dbccf77383575912ad75533ca690302557e0f79.gz
* distinction between apostrophes and single quotes FS#1127Andreas Gohr2007-05-13
| | | | | | | | | | This patch adds another parser mode for apostrophes. Now single quote closing markers are handled different from apostrophes for better local typograpy support. Needs testing and languages updates. darcs-hash:20070513084024-7ad00-d20fe093a093c265d357b178e199c1596b484996.gz
* create an addPluginCall() method for the handlerchris2007-01-25
| | | | | | | | | | refactor plugin() method to use new function this provides an interface for plugins to write their own instructions directly when returning a single instruction is not sufficient and saves plugin authors from hacking the handler's calls stack darcs-hash:20070125144103-9b6ab-3df781ec7fd1c4e75ac198139581cd2759c91052.gz
* improve and centralise email regexp, fixes FS#1049chris2007-01-25
| | | | darcs-hash:20070125143421-9b6ab-93ce6bfd804924af4651da9424738494f11fe5f2.gz
* fixed broken table alignmentAndreas Gohr2007-01-24
| | | | darcs-hash:20070124201255-7ad00-532c5d1ddc4d24aab980ff2cf6f521b051c73be2.gz
* moved simple URL handling from renderer to handlerAndreas Gohr2007-01-24
| | | | darcs-hash:20070124101306-6e07b-f3b325915c5b379c5ec8ae3bcf21943be1942e83.gz
* readded two changes from recent rollbackAndreas Gohr2007-01-06
| | | | darcs-hash:20070106111209-7ad00-2f632e44c6062d0c428269feb4276e83124eedad.gz
* UNDO: regex_simpler.patchhenning.noren2007-01-04
| | | | | | Replaces some simple regular expressions with standard (faster) string functions darcs-hash:20070104194953-d2a3e-8fd0c89812277467c5bce566dfc3fba6ce1c3981.gz
* regex_simpler.patchhenning.noren2007-01-04
| | | | | | Replaces some simple regular expressions with standard (faster) string functions darcs-hash:20070104194953-d2a3e-0b06e7a599a0177ad37a54497074893572e1cae2.gz
* tf_rename_lower.patchhenning.noren2007-01-03
| | | | | | | Name the TRUE/FALSE-constants consistently as lowercase everywhere. This might also be an tiny optimization in some environments. darcs-hash:20070103205700-d2a3e-e7ec0aedb938d563f583116a2d5b17f3a3fea36c.gz
* amendments to previous patch updating rss & cachechris2006-09-25
| | | | | | | | | | | rss syntax extended to include a refresh parameter <digits><period> period can be d,h,m for days, hours, minutes respectively if not specified will default to 4 hours dokuwiki imposes a minimum of 10 minutes metadata now used "date valid age" (seconds) rather than "date valid end" darcs-hash:20060925201222-9b6ab-c8e6d8e40bb178295bab874fce5147ccff35fbbb.gz
* parser update, add 'rss' to block mode lists, see FS#888.chris2006-09-17
| | | | darcs-hash:20060917211445-9b6ab-ae454dbf55ef50d664a80afd32fd42667f438ba5.gz
* more unit test fixeschris2006-08-09
| | | | | | - move parser.test.php darcs-hash:20060809192115-9b6ab-973fea51fbfdcf5f44a2ac66000f2ccb5fdd43b4.gz
* fix for footnote nestingchris2006-08-09
| | | | darcs-hash:20060809155417-9b6ab-c88a818425487cac0cd1f8d7cd266ac088bba16c.gz
* more unittest updateschris2006-08-05
| | | | darcs-hash:20060805082442-9b6ab-8447755da8c66c5cfc3ee0df0f8bb97375a2a1ff.gz
* fix for bug #701, lists in footnotes in listschris2006-08-05
| | | | | | | | | | | | | | | | added Doku_Handler_Nest class & "nest" render instruction These allows render instructions to be nested within the "nest" render instruction, isolating them from the outer list of render instructions. Not being able to do this is a particular problem for the current Doku_Handler_* classes as they process the list of intructions generated during their life without any recognition that some of the instructions may not belong to them being nested within another syntax mode. This also makes it easier for plugins to generate cacheable nested instructions rather than using the expensive p_render() function which has to create a new renderer. darcs-hash:20060804220100-9b6ab-ccd051e287af45afacdb1efecb8d9beb376276cb.gz
* unittest fixeschris2006-08-04
| | | | darcs-hash:20060804142243-9b6ab-d208f7f1a67a9958fda05c519c8407ad5e733cea.gz
* fixing edit section bugsBen Coburn2006-06-18
| | | | | | | | | | - Final edit section now ignored when there is only one header. - The configuration property 'maxseclevel' is now honored again. - Instructions are not created by the handler for edit sections that have a level higher than 'maxseclevel'. These ignored edit sections are merged into the previous edit section. darcs-hash:20060617223723-05dcb-a1282e827468de00977179c8c8924fb00ec2d56c.gz
* bug#701 - partial fixchris2006-06-06
| | | | | | | | | | | | | | | | This patch resolves issues with how call writers merge their instructions into the main handler instruction list. - writeCalls will now only merge instructions into the list of the next higher call writer - all call writers have been given a finalise() method to use when the call writer needs to be terminated gracefully at the end of parsing when the wiki markup didn't provide its expected exit syntax. I have only tested finalise with lists. It still requires testing with wiki markup which results in improperly closed tables, quotes and preformatted text (it may not be possible to improperly terminate some of these syntax modes). darcs-hash:20060606131200-9b6ab-1fcde7e25e173de014e2f99bfdee22279b2d911d.gz
* bug#811chris2006-05-30
| | | | darcs-hash:20060530113123-9b6ab-076ed03543c92413e6317992d9cb2f32534b42c3.gz
* update header test cases 20060526Ben Coburn2006-05-26
| | | | | | | Also resolves a small p_close anomaly introduced when section edits were given their own instruction. darcs-hash:20060526170229-05dcb-9509e939b923fe966b901fe5d90ba499828a56c1.gz
* decouple section edit from header in rendererBen Coburn2006-05-22
| | | | | | | | | | | | | | | | | | | | This patch achieves a partial decoupling of the section edit buttons from the header syntax. A new 'section_edit' instruction is added to the instruction list. The default set of these instructions is generated from the header handler and the _finalize function. A generic 'section_edit' renderer is now part of the renderer. To rewrite the section semantics, add, or remove section edit buttons the header handler and renderer no longer need to be modified. Changes can be dynamically made to the section edit buttons through the 'PARSER_HANDLER_DONE' action event. An action plugin that registers this event can then modify the calls list of the handler object before it is rendered. In short, this patch makes it possible to change the behavior of the section edit buttons without having to change unrelated code. This patch should be entirely transparent to DokuWiki users and cleanly written plugins. darcs-hash:20060522060004-05dcb-8e6b5215e1b610877f126ca0b9e1e5bc21cc6469.gz
* metadata hnalding updates, header fixesAndreas Gohr2006-05-07
| | | | | | | | This removes the meta instruction again in favour of the new meta renderer. Most tests work now again, a few tweaks were done on the header handler to render certain headers as it did in earlier versions. darcs-hash:20060507153113-7ad00-bd299fbe1762482c72d109f9bca776f12bcea7c8.gz
* event system revisionchris2006-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a major revision of DokuWiki's event system. There are changes to class names, function names, function parameters and their order and event names. For action plugin writers the following changes are important: - <event_name> is no longer signalled, only <event_name>_BEFORE and <event_name>_AFTER. - note the case change for _BEFORE and _AFTER - calling stopPropagation while processing a _BEFORE signal no longer prevents an _AFTER signal. The events _continue value is reset before the _AFTER signal is made. - events have a new readonly property, canPreventDefault. This lets the event handling hook know whether or not the event honours preventDefault calls. - parameters have changed for the register_hook method, parameters are now $event_name, $advise (can be 'BEFORE' or 'AFTER') $object $method $param (this parameter is now optional) - parameter order has changed for the hook event handler callback functions &$event $param (can now be left off) Event names have changed, they are now structured <dokuwiki name>_<event data name>_<action_name or state if no action> DOKUWIKI_START darcs-hash:20060424220152-9b6ab-00e366288f7ec8a85b85dc83694a5f43a07aa082.gz
* event HANDLER_FINALISEDchris2006-04-14
| | | | | | | | | | | | | | | This event is advisory only. Event data is the handler object. There is no default action to prevent. The event is signalled by the handler during its finalisation of the instruction list. At the time of signalling the instruction list is complete except for three instrucitons, meta, document_start & document_end. Syntax plugins could register for this event to finalise processing of their data knowing it is complete, e.g. an alternate footnote plugin. darcs-hash:20060414201101-9b6ab-eba2d096ed3b82e1ec6b24ee90caaa9849f16093.gz
* feed aggregation revampedAndreas Gohr2006-04-14
| | | | | | Feeds are now parsed with SimplePie. The feed syntax was enhanced darcs-hash:20060414110047-7ad00-6dd4b96845baab8683a2f837d6ad6fcb2fd53131.gz
* even faster header parsing using strspnAndreas Gohr2006-04-12
| | | | darcs-hash:20060412184125-7ad00-e51f8d531bf3011d230f62cb99fd18de8f150c41.gz
* reverted method to determine the header levelAndreas Gohr2006-04-10
| | | | darcs-hash:20060410194333-7ad00-abb8bc33f647ccd8587edbcc151bc60895dd3ae0.gz
* Parser Update:chris2006-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - revisions to header class and section handling header pattern simplified header class now writes section open and close instructions section call writer removed check for and update meta['first_header'] if required (see below) - meta instruction added written by _finalize to front of instruction stack holds first header information plugins can now write first header information, or other page meta information to this data structure. - get_first_heading updated to make use of meta['first_header'] - plugin instruction structure changed to include lexer state in the data portion of the instruction. OLD INSTRUCTION: array('plugin', array(<plugin name>,<plugin_data>,$pos), $pos) NEW INSTRUCTION: array('plugin', array(<plugin name>,<plugin_data>,$state), $pos) - block handler/call writer update to better handle plugin PTypes 'block' & 'stack'. Lexer states are mapped as follows: DOKU_LEXER_ENTER, DOKU_LEXER_SPECIAL : block_open, stack_open DOKU_LEXER_EXIT, DOKU_LEXER_SPECIAL : block_close, stack_close DOKU_LEXER_MATCHED, DOKU_LEXER_UNMATCHED : plugin must handle <p> Plugin writers can now use these PTypes as intended ! darcs-hash:20060409214958-9b6ab-cd2cef97a6a2521e3a02175075b8ff4648035f69.gz
* removed deprecated TOC codeAndreas Gohr2006-02-24
| | | | darcs-hash:20060224151221-7ad00-314d411cb22d2cd59079751f31cf4b4c49a7f0b6.gz
* some TOC fixesAndreas Gohr2006-02-19
| | | | darcs-hash:20060219164726-7ad00-eb637e1db83e2f3b6c3629da18214b6587590b24.gz
* create unique IDs for sectionsAndreas Gohr2006-02-19
| | | | | | | | | | | | | | | | | | | | This patch finally completes the support for unique section IDs. To achive this the mechanism how the TOC is build was changed. The TOC now is build in the renderer only. Currently the TOC will be rendered in the end_document function and is then prepended to the doc. This should ensure compatibility with the rest of the code. Adding support for separating the TOC from the page should now be a simpler task in the future. TODO: - Update base class - remove commented old TOC code - make sure no other parts of the code use any of the old TOC code darcs-hash:20060218230744-7ad00-40c5463d93f8ae1c543fb4fed747b2047b4c1302.gz
* file cleanupsAndreas Gohr2006-02-17
| | | | | | | | | | This patch cleans up the source code to satisfy the coding guidelines (see http://wiki.splitbrain.org/wiki:development#coding_style) It converts files to UNIX lineendings and removes tabs and trailing whitespace. Not all files were cleaned yet. darcs-hash:20060217222040-7ad00-bba3d2bee3b5aa7cbb5184258abd50805cd071bf.gz
* get_tests_running_1hfuecks2005-11-07
| | | | darcs-hash:20051106233800-e96b6-90328f1b6cc5c8b25c6e02f113cf80475789d297.gz
* Table Syntax fixes #280 #591Andreas Gohr2005-11-03
| | | | darcs-hash:20051103162630-6e07b-21520008f556114f8273307e7d6d33795488b1d2.gz