Skip to content

Conversation

@dominik-filip
Copy link

Extends :break_token configuration with :break_token_at_count which allows to specify at which occurrence of :break_token to truncate HTML.

Possible use case: truncate first 3 paragraphs.

TruncateHtml.configure do |config|
  config.break_token = '</p>'
  config.break_token_at_count = 3
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant