Croway commented on code in PR #29142:
URL: https://github.com/apache/camel/pull/29142#discussion_r4465726143


##########
components/camel-groovy/src/main/docs/groovy-language.adoc:
##########
@@ -79,6 +79,12 @@ bar = "baz"
 result = body * 2 + 1
 ----
 
+=== Text with placeholders (GString)
+
+In Groovy, a double-quoted string with placeholders, such as `"Hello ${body}"` 
or `"Hello $name"`, is a GString,

Review Comment:
   Inside single backticks, `{body}` is read as an AsciiDoc attribute 
reference, which fails the doc validation. The upgrade guide writes it with a 
passthrough elsewhere (`` `+${body}+` ``). With asciidoctor and 
`--failure-level WARN -a attribute-missing=warn`, the current text logs 
`skipping reference to missing attribute: body`, and the text below gives no 
warning and the same `<code>"Hello ${body}"</code>`:
   
   ```suggestion
   In Groovy, a double-quoted string with placeholders, such as `+"Hello 
${body}"+` or `"Hello $name"`, is a GString,
   ```
   
   The catalog copy 
(`catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/groovy-language.adoc`)
 then needs regenerating.



##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -3403,6 +3403,15 @@ comment after the transition was made, `watchers` and 
`addIssue` can fail after
 (`addIssue` sets the created issue as the message body before it adds the 
watchers), and a retry or redelivery
 repeats the earlier requests.
 
+=== camel-groovy - a script that returns a GString gives a String
+
+A Groovy expression or script that returns a GString (a double-quoted string 
with placeholders, such as
+`"Hello ${body}"`) now gives a `String`. Before, the body, header or variable 
was set to the GString

Review Comment:
   Same here:
   
   ```suggestion
   `+"Hello ${body}"+`) now gives a `String`. Before, the body, header or 
variable was set to the GString
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to