From c80df59b25388d69db93b64323ae6371a6c79e53 Mon Sep 17 00:00:00 2001 From: "T.J. Schuck" Date: Thu, 11 Feb 2021 16:48:45 -0500 Subject: [PATCH] Fix formatting in highlight docs Right now, the `\1` in the plain text gets escaped to just "1" in the rendered docs. Wrap it in `tt` tags to keep the \ there as intended. [ci skip] --- actionview/lib/action_view/helpers/text_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionview/lib/action_view/helpers/text_helper.rb b/actionview/lib/action_view/helpers/text_helper.rb index e98cf998ce..0d6519e53c 100644 --- a/actionview/lib/action_view/helpers/text_helper.rb +++ b/actionview/lib/action_view/helpers/text_helper.rb @@ -109,7 +109,7 @@ module ActionView # Highlights one or more +phrases+ everywhere in +text+ by inserting it into # a :highlighter string. The highlighter can be specialized by passing :highlighter # as a single-quoted string with \1 where the phrase is to be inserted (defaults to - # '\1') or passing a block that receives each matched term. By default +text+ + # \1) or passing a block that receives each matched term. By default +text+ # is sanitized to prevent possible XSS attacks. If the input is trustworthy, passing false # for :sanitize will turn sanitizing off. #