mirror of
https://github.com/elastic/kibana.git
synced 2025-04-22 00:45:43 -04:00
Closes #162381 ## Summary This PR is,,, 1. Adding documentation about objectization in variable substitution. 2. Fixing a glitch in the illegal double quotes `""`. <details open="true"><summary>details</summary> For example, `""${ZERO}""` may have substituted `"0"` but this substitution must not occur because no quotes surround the `${ZERO}` in the context of JSON syntax. `""${ZERO}""` is jut `${ZERO}` with forward and training `""`.</details> 3. Promoting triple quotes `"""` as an alternative to the illegal double quotes `""`. <details open="true"><summary>details</summary> Now `"""${ZERO}"""` is a way to substitute `"""0"""` rather than `0` that `"${ZERO}"` may substitute. The same as before, these single and triple quotes work only in the request body.</details> ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) Note: Regex negative lookahead `x(?!y)` and ~~lookbehind `(?<!y)x`~~ (_EDIT: no lookbehind anymore_) assertions ([cf.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Assertions#other_assertions)) are used in this PR. So, I've checked the following steps on each browser. Browsers: - Chrome 115.0.5790.102 - Firefox 115.0.2 - Edge 115.0.1901.183 - Safari 16.3 (18614.4.6.1.6) ~~CAN'T CHECK~~ - Safari has recently added support for the negative lookbehind as per this 16.4 release note. > https://developer.apple.com/documentation/safari-release-notes/safari-16_4-release-notes > Added support for RegExp lookbehind assertions. Steps: 1. Go to Dev Tools > Console. 2. Click `Variables` on the top. 4. Define variable `ZERO` with `0`. 6. Run the following command. ```http POST test/_doc { "field": "${ZERO}" } ``` ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ## Release note Improves a way of variable substitution and its documentation --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
---|---|---|
.. | ||
console | ||
grokdebugger | ||
painlesslab | ||
searchprofiler |