Skip to content

Commit

Permalink
Updates utils.js by adding PATCH support (#2967)
Browse files Browse the repository at this point in the history
* Update utils.js by adding patch support

* Update resources/web/docs_js/utils.js
  • Loading branch information
nastasha-solomon authored Mar 21, 2024
1 parent e6b9758 commit 8d2e238
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/web/docs_js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export function open_current(pathname) {
export function console_regex() {
// Port of
// https://github.com/elastic/elasticsearch/blob/master/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy#L71-L79
var method = '(GET|PUT|POST|HEAD|OPTIONS|DELETE)';
var method = '(GET|PUT|POST|PATCH|HEAD|OPTIONS|DELETE)';
var pathAndQuery = '([^\\n]+)';
var badBody = 'GET|PUT|POST|HEAD|OPTIONS|DELETE|#';
var badBody = 'GET|PUT|POST|PATCH|HEAD|OPTIONS|DELETE|#';
var body = '((?:\\n(?!$badBody)[^\\n]+)+)'.replace('$badBody', badBody);
var nonComment = '$method\\s+$pathAndQuery$body?'.replace(
'$method',
Expand Down

0 comments on commit 8d2e238

Please sign in to comment.