DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:linebreak

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:linebreak [2009-10-10 23:38] – adjusted status tag achplugin:linebreak [2018-06-04 23:00] (current) Klap-in
Line 1: Line 1:
-====== linebreak plugin ======+====== linebreak Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 7: Line 7:
 type       : syntax, action type       : syntax, action
 lastupdate : 2007-01-20 lastupdate : 2007-01-20
-compatible :+compatible : Weatherwax
 depends    : depends    :
 conflicts  : conflicts  :
 similar    : similar    :
 tags       : typography, !experimental tags       : typography, !experimental
 +downloadurl: http://dokuwiki.jalakai.co.uk/plugin-linebreak.zip
 ---- ----
  
 [[:experimental]] [[:experimental]]
  
-^ :!: | Packages updated to include functions missing from 2006-03-09 DokuWiki. |+**Use [[plugin:xbr|xbr]] rather than linebreak.  xbr is a render plugin and replaces the way the DokuWiki renders ordinary text to preserve line breaks.\\  
 +Linebreak is a hack from the time before render plugins were possible.\\ 
 +Its reported not to work (at least in some wikis) with the latest version of DokuWiki.  I won't be updating it.\\ 
 +\\ 
 +- [[http://www.freelists.org/post/dokuwiki/Preserve-newlines-but-otherwise-process-normally-how,3?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+freelists-feeds/dokuwiki+(dokuwiki)|Chris]]\\ 
 +(author of both xbr and linebreak plugins)** 
 + 
 + 
 +^ :!:  | Packages updated to include functions missing from 2006-03-09 DokuWiki.  |
  
-This [[:plugin]] changes the way DokuWiki treats single line break in the raw wiki text - instead of the default behaviour, where the line break is absorbed, it will generate a line break in the html output.+This [[:plugin]] changes the way DokuWiki treats single line break in the raw wiki text - instead of the default behaviour, where the line break is absorbed, it will generate a line break in the HTML output.
  
 This plugin maybe useful for wiki pages which include poetry, song lyrics or other content which is naturally written with meaningful single line breaks. This plugin maybe useful for wiki pages which include poetry, song lyrics or other content which is naturally written with meaningful single line breaks.
Line 31: Line 40:
  
 ===== Installation ===== ===== Installation =====
 +Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 Plugin sources:  Plugin sources: 
Line 37: Line 47:
   * for DokuWiki development version --- [[http://wiki.jalakai.co.uk/repo/dokuwiki/plugins/linebreak|darcs]]   * for DokuWiki development version --- [[http://wiki.jalakai.co.uk/repo/dokuwiki/plugins/linebreak|darcs]]
  
-If your wiki uses either the [[plugin:plugin]] manager or the [[plugin:darcs|darcs plugin]] you can use them with the appropriate links above to install the plugin.     
- 
-To install the plugin manually, download the source to your plugin folder, ''lib/plugins'', and extract its contents.  That will create a new plugin folder, ''lib/plugins/linebreak'', and install the plugin. 
- 
-The folder will contain: 
-  syntax.php                            ; plugin script 
-  conf/default.php                      ; default configuration setting values 
-  conf/metadata.php                     ; information for the configuration settings page 
-  lang/xx/settings.php                  ; language strings for configuration settings page 
  
-The plugin is now installed. 
  
 ===== Configuration ===== ===== Configuration =====
Line 199: Line 199:
      * plugin should use this method to register its handlers with the DokuWiki's event controller      * plugin should use this method to register its handlers with the DokuWiki's event controller
      */      */
-    function register(&$controller) {+    function register(Doku_Event_Handler $controller) {
       $controller->register_hook('PARSER_WIKITEXT_PREPROCESS', 'BEFORE',  $this, '_addspaces', NULL);       $controller->register_hook('PARSER_WIKITEXT_PREPROCESS', 'BEFORE',  $this, '_addspaces', NULL);
       $controller->register_hook('PARSER_HANDLER_DONE','BEFORE', $this, '_fixsecedit', NULL);       $controller->register_hook('PARSER_HANDLER_DONE','BEFORE', $this, '_fixsecedit', NULL);
Line 346: Line 346:
 >>>> //comment updated// New version released for DokuWiki release candidate including the action plugin which removes the need for spaces after markup -- see above. --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-10-18 22:15// >>>> //comment updated// New version released for DokuWiki release candidate including the action plugin which removes the need for spaces after markup -- see above. --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-10-18 22:15//
  
-  * After I updated DokuWiki from 2006-03 to 2006-11 (latest version), linebreak (version 2006-10-18) began to destroy my editing: Everytime I tried to edit a section, the beginning and the ending was not recognized and broke (something inserted linebreaks at the beginning and the ending, inside of headings.) I had to erase the plugin (and now its fine again). I miss it... Will there be an update? --- //[[diftong@gmx.net|Patric Schatzmann]] 2006-12-05//+  * After I updated DokuWiki from 2006-03 to 2006-11 (latest version), linebreak (version 2006-10-18) began to destroy my editing: Every time I tried to edit a section, the beginning and the ending was not recognized and broke (something inserted linebreaks at the beginning and the ending, inside of headings.) I had to erase the plugin (and now its fine again). I miss it... Will there be an update? --- //[[diftong@gmx.net|Patric Schatzmann]] 2006-12-05//
  
 > Yes.  For now, you can either stick to using "Edit Page" rather than "edit section" or stick with the old version of the plugin (requires spaces after DokuWiki syntax codes that appear immediately prior to line endings).  --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-12-10 03:53// > Yes.  For now, you can either stick to using "Edit Page" rather than "edit section" or stick with the old version of the plugin (requires spaces after DokuWiki syntax codes that appear immediately prior to line endings).  --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-12-10 03:53//
Line 360: Line 360:
 >>>>> Ok. Thanks for clarifying this. I'm happy with it as it is. --- //[[emodul@gmx.net|eModul]] 2007-02-28 20:01// >>>>> Ok. Thanks for clarifying this. I'm happy with it as it is. --- //[[emodul@gmx.net|eModul]] 2007-02-28 20:01//
  
-  * Just installed this plug-in (from 2007-01-20), and it breaks the [[doku>plugin:deflist|deflist]] plug-in for me. Proposals?+  * Just installed this plug-in (from 2007-01-20), and it breaks the [[plugin:deflist|deflist]] plug-in for me. Proposals?
   * I've noticed that a line break doesn't appear immediately after an unordered list even if I leave a blank line between the list and the following text. It does appear if I put a space on the blank line, though.   * I've noticed that a line break doesn't appear immediately after an unordered list even if I leave a blank line between the list and the following text. It does appear if I put a space on the blank line, though.
  
Line 377: Line 377:
   - requiring a %%\\%% makes it more difficult to move text files into DokuWiki   - requiring a %%\\%% makes it more difficult to move text files into DokuWiki
   - the source text file looks ugly, cluttered, and unnatural   - the source text file looks ugly, cluttered, and unnatural
-  - requiring an inviable character at the end of the %%\\%% means I can not just look at my source text file and tell if there is line break or not.+  - requiring an invisible character at the end of the %%\\%% means I can not just look at my source text file and tell if there is line break or not.
  
 That said, the I don't know if integrating this plugin would be the best solution. In my experience, this plugin causing longer pages to not load.  That said, the I don't know if integrating this plugin would be the best solution. In my experience, this plugin causing longer pages to not load. 
Line 409: Line 409:
 This broke several other plugins for me (code replacement 2, footnote, etc.). Additionally, it did not uninstall correctly, all wiki pages now have ~~LINEBREAK0~~ or something similar on them. Had to search and delete cache files to remove. -- JR 12-06-07 This broke several other plugins for me (code replacement 2, footnote, etc.). Additionally, it did not uninstall correctly, all wiki pages now have ~~LINEBREAK0~~ or something similar on them. Had to search and delete cache files to remove. -- JR 12-06-07
 ---- ----
-Agree, because a plugin never gets the same support like the main code, and problems with updates, incompatibilities and other plugins are possible. And destruction of source text is a very bad effect. (i had problems with linebreak and had to deactivate it. use now a patch witch change the main code, and had never problems anymore). 20-12-2007+Agree, because a plugin never gets the same support like the main code, and problems with updates, incompatibilities and other plugins are possible. And destruction of source text is a very bad effect. (i had problems with linebreak and had to deactivate it. use now a patch witch change the main code, and had never problems anymore). 20-12-2007
 ---- ----
 Agree, please include in main code -- GB 10-01-08 Agree, please include in main code -- GB 10-01-08
Line 420: Line 420:
 ---- ----
 Another vote to include in the main code and/or make it a configuration setting.  My users paste a lot of emails into the wiki.  Instead of just copy/paste it requires a huge amount of time and effort that really is not needed..  CG 12-2-08 Another vote to include in the main code and/or make it a configuration setting.  My users paste a lot of emails into the wiki.  Instead of just copy/paste it requires a huge amount of time and effort that really is not needed..  CG 12-2-08
 +
 +----
 +11-09-10
 +Linebreak plug-in was working very well until I installed the latest version.
 +
 +Now when pressing 'edit' button at the middle title after the newest version installed, I can correct only a part of it easily, But it is still printing oddly that the upper and lower part of content/context are broken while the linebreak plug-in is on.
 +
 +How can I bring into same effect as linebreak is on, NOT using \\ ?
 +
 +example.
 +
 +**Source**
 +<code>
 +====== test ======
 +
 +Hello, world.
 +
 +====== temp ======
 +</code>
 +
 +
 +**clicking middle edit button**
 +<code>
 +
 +==
 +
 +Hello, world.
 +
 +====== temp ===== 
 +</code>
plugin/linebreak.1255210690.txt.gz · Last modified: 2009-10-10 23:38 by ach

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