Class: LlmDocsBuilder::Transformers::WhitespaceTransformer
- Inherits:
-
Object
- Object
- LlmDocsBuilder::Transformers::WhitespaceTransformer
- Includes:
- BaseTransformer
- Defined in:
- lib/llm_docs_builder/transformers/whitespace_transformer.rb
Overview
Transformer for whitespace normalization
Reduces excessive blank lines and trailing whitespace to make content more compact for LLM consumption.
Instance Method Summary collapse
-
#transform(content, options = {}) ⇒ String
Transform content by normalizing whitespace.
Methods included from BaseTransformer
Instance Method Details
#transform(content, options = {}) ⇒ String
Transform content by normalizing whitespace
20 21 22 23 24 |
# File 'lib/llm_docs_builder/transformers/whitespace_transformer.rb', line 20 def transform(content, = {}) return content unless [:normalize_whitespace] normalize_whitespace(content) end |