Table of Contents

Spreadout Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" yes
  • 2020-07-29 "Hogfather" yes

plugin A simple plugin that allows for two spaces between content sentences if the user types two spaces rather than one

Last updated on
2022-08-02
Provides
Syntax, Helper
Repository
Source

Similar to replace, strreplace

Tagged with replace, spacing, text

Requirements

PHP 7+ required.

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Configuration

There is no configuraton required.

Usage

Edit your Dokuwiki pages as you normally would. If you only use single spaces, then nothing changes whatsoever.

If you enter more than one space after a sentence then the text will be replaced by a space followed by a nonbreaking space entity ( ) so that two spaces will be rendered in the final text.

Currently, the spaces are placed after the following characters followed by two or more spaces:

potentially followed by the characters:

Note that the colon may not precede a closing parenthesis, only the other symbols.

The follow-up characters are important because if you enter a parenthetical and it is the end of a sentence, you still want double spacing after it. Also, in Dokuwiki syntax you often have square or curly braces around text to denote links or styling, and they may fall at the end of a sentence.

The name "Spreadout"

I find it's far easier to skim text if I have better clues about where sentences begin and end with extra whitespace, but HTML takes that away from me by collapsing multiple spaces into a single space unless I specifically make a non-breaking space entity or character. Since I have several wikis I maintain, I figured it'd be nice if I could “spread out” the sentences to make the content easier to look over at a glance.

Development

Change Log

Future plans

Known Bugs and Issues

None known.

If you find a bug, please submit a report at the project's github.