Symbol Substitution Rule

This rule enforces consistent usage of proper typographic symbols instead of their ASCII or text-based equivalents. It helps maintain professional typographic standards in documents by replacing commonly used text approximations with their proper Unicode symbol counterparts.

The motivation behind this rule is that proper typographic symbols look more professional and are semantically correct. Using the correct symbols enhances readability and demonstrates attention to detail in your documentation.

Examples:

  • Will flag ... and suggest using the ellipsis symbol
  • Will flag (c) or (C) and suggest using the copyright symbol ©
  • Will flag (TM) or (tm) and suggest using the trademark symbol
  • Will flag (r) or (R) and suggest using the registered trademark symbol ®
  • Will flag dimensions written like 2x2 or 2 x 2 and suggest using the multiplication symbol ×

For instance, writing "Product(TM)" would trigger an error suggesting to use "Product™" instead. Similarly, "Copyright (c) 2024" should be written as "Copyright © 2024".

Rule Source

This rule comes from: https://github.com/mesosphere/dcos-docs-site

Rule Definition

extends: substitution
message: Consider using the '%s' symbol instead of '%s'.
level: error
nonword: true
swap:
  '\.\.\.': …
  '\([cC]\)': ©
  '\(TM\)': ™
  '\(tm\)': ™
  '\([rR]\)': ®
  '[0-9]+ ?x ?[0-9]+': ×