Not logged in. · Lost password · Register
Forum: General Help and Support Syntax and Usage RSS
delimiter for acronym file
mekineer #1
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
Subject: delimiter for acronym file
Continuation of thread:
Since some people are touchy about continuing an old thread.

Maybe there is a way to change the delimiter in acronyms.conf from a whitespace to something else, like 4 whitespaces.

Can someone who can read PHP see if the delimiter is in parser.php in this section:

class Doku_Parser_Mode_acronym extends Doku_Parser_Mode {
    // A list
    var $acronyms = array();
    var $pattern = '';

    function __construct($acronyms) {
        $this->acronyms = $acronyms;

    function preConnect() {
        if(!count($this->acronyms)) return;

        $bound = '[\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]';
        $acronyms = array_map('Doku_Lexer_Escape',$this->acronyms);
        $this->pattern = '(?<=^|'.$bound.')(?:'.join('|',$acronyms).')(?='.$bound.')';

    function connectTo($mode) {
        if(!count($this->acronyms)) return;

        if ( strlen($this->pattern) > 0 ) {

    function getSort() {
        return 240;

     * sort callback to order by string length descending
    function _compare($a,$b) {
        $a_len = strlen($a);
        $b_len = strlen($b);
        if ($a_len > $b_len) {
            return -1;
        } else if ($a_len < $b_len) {
            return 1;

        return 0;

Or maybe this section of xhtml.php:

    function acronym($acronym) {

        if(array_key_exists($acronym, $this->acronyms)) {

            $title = $this->_xmlEntities($this->acronyms[$acronym]);

            $this->doc .= '<abbr title="'.$title

        } else {
            $this->doc .= $this->_xmlEntities($acronym);
mekineer #2
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
I prefer the internal acronym function over the Explain plugin, for the following reasons:

I like the acronym style of the underlining.
I like the acronym style of tooltip.
I don't want an internal or external link.
I don't want the tooltip plugin, because I want the definition to be wiki-wide.

Basically, I want to change the acronym file delimiter from a whitespace to 4 whitespaces.  That is all.

So help me God, I'll use underscores for multi-word terms if I have to.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-04-04, 12:23:41 (UTC +02:00)