We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Motivation
in http language, request-line / response-status are less tokenized for me.
I would like to make PR if it works.
Description
current request-line
GET /path HTTP/1.1
results in
<span class="token request-line"> <span class="token property">POST</span> /default-endpoint HTTP/1.1 </span>
would like to be
<span class="token request-line"> <span class="token method">POST</span> <span class="token string">/default-endpoint</span> <span class="token property">HTTP/1.1</span> </span>
current response status
HTTP/1.1 200 OK
<span class="token response-status"> HTTP/1.1 <span class="token property">200 OK</span> </span>
<span class="token response-status"> <span class="token property">HTTP/1.1</span> <span class="token number">200</span> <span class="token string">OK</span> </span>
class name are wip, ping me if other choice fit's here.
The text was updated successfully, but these errors were encountered:
PRs are always welcome!
class names are wip
My suggestion for class names is the following: make the token name specific and use aliases for coloring.
Example:
<span class="token response-status"> <span class="token http-version property">HTTP/1.1</span> <span class="token status-code number">200</span> <span class="token reason-phrase string">OK</span> </span>
The grammar could look like this:
'response-status': { pattern: /.../, inside: { 'http-version': { pattern: /^HTTP\/[\d.]+/, alias: 'property' }, 'status-code': { pattern: /^(\s)\d+(?=\s)/, lookbehind: true, alias: 'number' }, 'reason-phrase': { pattern: /^(\s).+/, lookbehind: true, alias: 'string' } } }
(I borrowed those names from the HTTP 1.1 specification but you may also use other names.)
Sorry, something went wrong.
it seems reasonable for me. I'll fix request-line too refer your suggest, and make PR soon. Thanks !
Successfully merging a pull request may close this issue.
Motivation
in http language, request-line / response-status are less tokenized for me.
I would like to make PR if it works.
Description
request line
current request-line
results in
would like to be
response status
current response status
HTTP/1.1 200 OK
results in
would like to be
class name are wip, ping me if other choice fit's here.
The text was updated successfully, but these errors were encountered: