Skip to content
Marcos Caceres edited this page Mar 28, 2026 · 13 revisions

highlightVars

Type: boolean Default: true

Enables click-to-highlight for <var> elements in algorithms. When a reader clicks a variable, all instances of that variable within the same section are highlighted, making it easier to trace variable usage through long algorithms.

Basic usage

var respecConfig = {
  highlightVars: false,
};

Notes

  • Variables must be marked up with <var> elements: Let <var>request</var> be a new request.
  • Highlighting is scoped to the nearest enclosing .algorithm list or <section> — whichever is closest
  • Clicking multiple variables gives each a distinct highlight color (up to 7 colors)
  • The |variable| shorthand automatically generates <var> elements

Guides

Configuration options

W3C Configuration options

Linting rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

HTML attributes

CSS Classes

Special properties

Clone this wiki locally