Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: lib/src/prism/components/prism-http.min.js

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/prism/components/prism-http.js ('k') | lib/src/prism/components/prism-inform7.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Prism.languages.http={"request-line":{pattern:/^(POST|GET|PUT|DELETE|OPTIONS|PAT CH|TRACE|CONNECT)\b\shttps?:\/\/\S+\sHTTP\/[0-9.]+/,inside:{property:/^\b(POST|G ET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-sta tus":{pattern:/^HTTP\/1.[01] [0-9]+.*/,inside:{property:/[0-9]+[A-Z\s-]+$/i}},ke yword:/^[\w-]+:(?=.+)/m};var httpLanguages={"application/json":Prism.languages.j avascript,"application/xml":Prism.languages.markup,"text/xml":Prism.languages.ma rkup,"text/html":Prism.languages.markup};for(var contentType in httpLanguages)if (httpLanguages[contentType]){var options={};options[contentType]={pattern:new Re gExp("(content-type:\\s*"+contentType+"[\\w\\W]*?)\\n\\n[\\w\\W]*","i"),lookbehi nd:!0,inside:{rest:httpLanguages[contentType]}},Prism.languages.insertBefore("ht tp","keyword",options)} 1 Prism.languages.http={"request-line":{pattern:/^(POST|GET|PUT|DELETE|OPTIONS|PAT CH|TRACE|CONNECT)\b\shttps?:\/\/\S+\sHTTP\/[0-9.]+/m,inside:{property:/^(POST|GE T|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-stat us":{pattern:/^HTTP\/1.[01] [0-9]+.*/m,inside:{property:{pattern:/(^HTTP\/1.[01] )[0-9]+.*/i,lookbehind:!0}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"key word"}};var httpLanguages={"application/json":Prism.languages.javascript,"applic ation/xml":Prism.languages.markup,"text/xml":Prism.languages.markup,"text/html": Prism.languages.markup};for(var contentType in httpLanguages)if(httpLanguages[co ntentType]){var options={};options[contentType]={pattern:new RegExp("(content-ty pe:\\s*"+contentType+"[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*","i"),lookbehind:!0 ,inside:{rest:httpLanguages[contentType]}},Prism.languages.insertBefore("http"," header-name",options)}
OLDNEW
« no previous file with comments | « lib/src/prism/components/prism-http.js ('k') | lib/src/prism/components/prism-inform7.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698