Home / Function/ escapeUnderscore() — tailwindcss Function Reference

escapeUnderscore() — tailwindcss Function Reference

Architecture documentation for the escapeUnderscore() function in candidate.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  e75d4265_5519_1d02_0a9d_aea6bf08284d["escapeUnderscore()"]
  7cb24904_9371_1e21_df0f_10f340632987["recursivelyEscapeUnderscores()"]
  7cb24904_9371_1e21_df0f_10f340632987 -->|calls| e75d4265_5519_1d02_0a9d_aea6bf08284d
  style e75d4265_5519_1d02_0a9d_aea6bf08284d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/candidate.ts lines 1174–1178

function escapeUnderscore(value: string): string {
  return value
    .replaceAll('_', String.raw`\_`) // Escape underscores to keep them as-is
    .replaceAll(' ', '_') // Replace spaces with underscores
}

Domain

Subdomains

Frequently Asked Questions

What does escapeUnderscore() do?
escapeUnderscore() is a function in the tailwindcss codebase.
What calls escapeUnderscore()?
escapeUnderscore() is called by 1 function(s): recursivelyEscapeUnderscores.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free