Solutions  | Services  | Support  | Search

Intellipunct: dashes

The conversion of dashes as a category is controlled by the convert_dashes setting in the config_intellipunct.php file. If convert_dashes is set to 0 or to false no substitutions will be made. If convert_dashes is set to 1 or to true substitutions will be made as set out below.

$config['convert_dashes'] =  0 or false or 1 or true

The spacing of dashes as a category is controlled by the space_dashes setting in the config_intellipunct.php file. If space_dashes is set to 0 or to false no substitutions will be made. If space_dashes is set to 1 or to true substitutions will be made as set out below.

$config['space_dashes'] =  0 or false or 1 or true

Note: The following describes the default configuration for Intellipunct. Your configuration may be modified to give different substitutions.

Single dash

This character is usually the key between the 0 key and the = key on the main keyboard and/or the minus key on the numeric keypad. Its location may vary on touchscreen devices with on‐screen keyboards.

$config['single_dash'] = '';

A single dash is substituted by Unicode character 8208 (hyphen) and - becomes ‐

Double dash

Two consecutive dashes are substituted by a single endash

$config['double_dash'] = '';

A double dash is substituted by Unicode character 8211 (endash) and -- becomes – .

Triple dash

Three consecutive dashes are substituted by a single endash

$config['triple_dash'] = '';

A double dash is substituted by Unicode character 8212 (emdash) and --- becomes — .

Spacing rules for dashes

The spacing rules control the removal and/or substitution of whitespace either side of dashes. A separate rule can be set for single, double and triple dashes. The spacing rule is a number from 0 to 3, and if the value is 2 or 3, two additional values separated by commas. The first additional value is used to the left of the dashes and the second additional value to the right of the dashes. The meaning of the number is as follows:

0 = do nothing (leave any whitespace if it exists)
1 = always remove any whitespace
2 = replace any existing whitespace with given characters
3 = always insert given character (replacing any whitespace if present)

Spacing single dashes

$config['space_single_dash'] = '0'; 

No changes are made to whitespace around single dashes; if it is there it is left alone and nothing is inserted.

Spacing double dashes

$config['space_double_dash'] = '3,8202,8202';

Any whitespace around double dashes is removed and Unicode character 8202 (hairspace) is inserted before and after the double dash.

Spacing triple dashes

$config['space_triple_dash'] = '3,8202,8202';

Any whitespace around triple dashes is removed and Unicode character 8202 (hairspace) is inserted before and after the triple dash.


Folio index | PJML index | Intellipunct index

Home  | Contact  | Payment  | Terms  | Login

Copyright Synergy Data Services Ltd. © 2012-2026. Registered in England and Wales. Company No. 8318571 x