In this article, you’ll learn more about the rule type text-replacement. See the table below:

Rule

text-replacement

Description

Check for specific words and recommend an alternative that should be used instead.

Ignore pages with label

scq-ignore-text-replacement

Configuration options:

scope

List of page elements where this rule applies. Can take one or more of the following values:

  • any

  • heading 

    • for specific heading levels use: heading1, heading2, heading3, heading4, heading5 or heading6

  • paragraph

  • link

  • quote

Defaults to: any

exactMatch

If set to false, this will also look for the word in slightly different forms. For example, it will find words that are in the possessive form (for example, "user" will find "user's") and will replace unicode umlauts by their ASCII variant (for example "bjork" will find "bjŏrk").

Defaults to: true

text

Dictionary of words to avoid and a suggested replacement (optional). Each entry needs to be in the following form:

text:
  find: replace
CODE

Example Settings

Unify spelling of certain terms

# Suggests to use a certain spelling of terms:
# "blog post" instead of "blogpost"
# "front-end" instead of "frontend"

rules:
  - rule: text-replacement
    level: minor
    text:
      blogpost: blog post
      frontend: front-end
CODE

Use more inclusive language

# Enforce inclusive text standards by replacing problematic words and phrases
# Selection based on: https://atlassian.design/content/inclusive-writing/

rules:
  - rule: text-replacement
    description: Use inclusive language
    level: major
    text:
      he: they
      she: they
      mankind: humanity
      whitelist: allowlist
      blacklist: blocklist
      master: primary
      slave: secondary
      dummy: placeholder
CODE

Enforce American English

# Enforce american english spellings. 
# Based on: https://www.oxfordinternationalenglish.com/differences-in-british-and-american-spelling/

rules:
  - rule: text-replacement
    description: Use american english
    level: major
    text:
      colour: color
      flavour: flavor
      humour: humor
      labour: labor
      neighbour: neighbor

      apologise: Apologize
      organise:	Organize
      recognise: Recognize

      analyse: analyze
      breathalyse: breathalyze
      paralyse: paralyze

      travelled: traveled
      travelling: traveling
      traveller: traveler

      leukaemia: leukemia
      manoeuvre: maneuver
      oestrogen: estrogen
      paediatric: pediatric

      defence: defense
      licence: license
      offence: offense
      pretence: pretense

      analogue: analog
      catalogue: catalog
      dialogue: dialog
YAML