It's better when it's simple

User Tools

Site Tools


nocode plugin

Compatible with DokuWiki

2009-02-14 (and above)

plugin Removes Indentation for Code

Last updated on

The missing download url means that this extension cannot be installed via the Extension Manager. Please see Publishing a Plugin on Recommended are public repository hosts like GitHub, GitLab or Bitbucket.

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with code, indentation, substition

Download and Installation

Just copy the file below to a directory named nocode inside your plugin directory

 * nocode-Plugin: Removes the Indentation for Code Syntax
 * Syntax: none
 * @license GPL 2
 * @author Franz Häfner <>
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
class syntax_plugin_nocode extends DokuWiki_Syntax_Plugin {
     * return some info
    function getInfo(){
	return array(
    	    'email'  => '',
    	    'date'   => '2010-06-02',
    	    'name'   => 'Remove Indentation for Code',
    	    'desc'   => 'Remove Indentation for Code',
	    'url'    => '',
    function getType(){ return 'substition';}
    function getPType(){ return 'normal';}
    function getSort(){ return 19; }
    function connectTo($mode) {
        // Has hard coded awareness of lists...
        $this->Lexer->addSpecialPattern('\n  (?![\*\-])',$mode,'plugin_nocode');
    function handle($match, $state, $pos, &$handler) {
	// do nothing
	return true;
    function render($mode, &$renderer, $data) {
	// do nothing again


Removes the syntax that allows to use the code-environment to be created by indenting text with two spaces or a tab.

Syntax and Usage

Since syntax from the original DokuWiki-Syntax is removed there is no need for syntax.


plugin/nocode.txt · Last modified: 2011-02-09 00:28 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