Skip to main content
Version: 2.2.x

Typographer

Description​

ParsedownExtended includes a typographer feature that enhances your Markdown writing experience. It provides useful shortcuts for common typographic symbols, making it easier and faster to create well-formatted content. Additionally, it offers limited misspelling detection and correction.

Configuration Syntax​

Configure the typographer feature in ParsedownExtended using the config()->set() method:

$ParsedownExtended->config()->set('typographer', (bool) $value);

Typographic Shortcodes:​

  • (c): Replaced with © (Copyright symbol).
  • (r): Replaced with ® (Registered trademark symbol).
  • (tm): Replaced with ™ (Trademark symbol).
  • (p): Replaced with ¶ (Paragraph symbol).
  • +-: Replaced with ± (Plus-minus symbol).

Misspelling Detection:​

  • .. is replaced with ... (Ellipsis).
  • ..... is replaced with ... (Ellipsis).
  • ?.... is replaced with ?.. (Question mark followed by ellipsis).
  • !.... is replaced with !.. (Exclamation mark followed by ellipsis).

These typographic shortcuts and limited misspelling corrections can improve the quality and consistency of your Markdown content.

Examples​

Enable Typographer​

To enable the typographer feature:

$ParsedownExtended->config()->set('typographer', true);