mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #2578] [MERGED] feat: allow quoted key/values for escaping characters and trail/lead whitespaces in raw key value pairs #3911
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#3911
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/2578
Author: @AndrewBastin
Created: 8/12/2022
Status: ✅ Merged
Merged: 8/12/2022
Merged by: @liyasthomas
Base:
main← Head:fix/2577📝 Commits (4)
70a7b90feat: add recordUpdate utility function167817dfeat: add ability to use special characters and leading/trailing spaces in raw key value strings5288f96chore: bump hopp-data version63f8bd9fix: add forced quoting if a special character is present in the entry📊 Changes
7 files changed (+392 additions, -80 deletions)
View changed files
📝
packages/hoppscotch-app/package.json(+1 -1)📝
packages/hoppscotch-cli/package.json(+1 -1)📝
packages/hoppscotch-data/package.json(+1 -1)📝
packages/hoppscotch-data/src/rawKeyValue.ts(+65 -6)➕
packages/hoppscotch-data/src/utils/record.ts(+17 -0)📝
packages/hoppscotch-js-sandbox/package.json(+1 -1)📝
pnpm-lock.yaml(+306 -70)📄 Description
This PR implements ability for Raw Key Value pairs to include escape characters for parsing leading and trailing whitespaces and other special characters which may be present in a raw key or value.
Closes #2577
Description
With the introduction of this PR, quotations will be allowed in Raw Key Value grammar
This will be parsed into the following AST representation
This allows for representing weird characters, trailing and leading whitespaces and use of key symbols of the grammar (like
#and:) within the key/value strings. Along with that, escape characters are also recognized and parsed into the AST representation when used within quotes (the syntax highlighting grammar for it is a bit weird though, issue tracked on hoppscotch/internal-issues#24).Checks
Additional Information
None of the previously considered to be valid key value pairs will be broken with this update.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.