DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:side_note

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
plugin:side_note [2012-11-20 23:37] Klap-inplugin:side_note [2013-03-06 15:42] (current) Klap-in
Line 144: Line 144:
      */      */
     function connectTo($mode) {     function connectTo($mode) {
-        $this->Lexer->addEntryPattern('<side right>(?=.*\x3C/side\x3E)',$mode,'plugin_sidenote'); +        $this->Lexer->addEntryPattern('<side right>(?=.*</side>)',$mode,'plugin_sidenote'); 
-        $this->Lexer->addEntryPattern('<side left>(?=.*\x3C/side\x3E)',$mode,'plugin_sidenote'); +        $this->Lexer->addEntryPattern('<side left>(?=.*</side>)',$mode,'plugin_sidenote'); 
-        $this->Lexer->addEntryPattern('<side>(?=.*\x3C/side\x3E)',$mode,'plugin_sidenote');+        $this->Lexer->addEntryPattern('<side>(?=.*</side>)',$mode,'plugin_sidenote');
     }     }
     function postConnect() {     function postConnect() {
Line 217: Line 217:
 I disagree --- a better pattern would be ''%%<side(?:\s+[^\r\n>]+)?>(?=.*</side>)%%'' This would allow the plugin to catch ''%%<note>%%'', ''%%<note left>%%'', or ''%%<note gobble-de-gook>%%'', but allow another plugin to catch, say, ''%%<sideways>%%''. I disagree --- a better pattern would be ''%%<side(?:\s+[^\r\n>]+)?>(?=.*</side>)%%'' This would allow the plugin to catch ''%%<note>%%'', ''%%<note left>%%'', or ''%%<note gobble-de-gook>%%'', but allow another plugin to catch, say, ''%%<sideways>%%''.
  
->> I always knew there was a way, but that it was beyond my regex expertise :-)  (\x3c & \x3e changes to < > since parser has been patched to support them) --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-04-22 16:53//+>> I always knew there was a way, but that it was beyond my regex expertise :-)  --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-04-22 16:53//
  
 >This plugin slightly breaks the <nowiki>\\</nowiki> line breaker when entering sidenote text. If you use the doubleslashes it throws a full empty line between paragraphs. You are forced to use <br> if you don't want messy spacing between lines. Is it possible to change this plugin so you can set a fixed column width in the tag, and the sidenote will autowrap with you manually needing to enter line breaks? [[dhry@dhryland.com|Dean-Ryan Stone]] 20060807 >This plugin slightly breaks the <nowiki>\\</nowiki> line breaker when entering sidenote text. If you use the doubleslashes it throws a full empty line between paragraphs. You are forced to use <br> if you don't want messy spacing between lines. Is it possible to change this plugin so you can set a fixed column width in the tag, and the sidenote will autowrap with you manually needing to enter line breaks? [[dhry@dhryland.com|Dean-Ryan Stone]] 20060807
plugin/side_note.1353451073.txt.gz · Last modified: 2012-11-20 23:37 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki