fix/variables highlighting (#2502)

* js highlighting fix, only highlight path params pattern in url bar

* path param pattern matching validation update

* path param tooltip validation update
This commit is contained in:
lohit
2024-07-01 19:25:55 +05:30
committed by GitHub
parent 02e23df349
commit bd61e453ee
4 changed files with 19 additions and 14 deletions

View File

@@ -69,6 +69,7 @@ const QueryUrl = ({ item, collection, handleRun }) => {
onChange={(newValue) => onUrlChange(newValue)}
onRun={handleRun}
collection={collection}
highlightPathParams={true}
item={item}
/>
<div className="flex items-center h-full mr-2 cursor-pointer" id="send-request" onClick={handleRun}>

View File

@@ -131,8 +131,8 @@ class SingleLineEditor extends Component {
addOverlay = (variables) => {
this.variables = variables;
defineCodeMirrorBrunoVariablesMode(variables, 'text/plain');
this.editor.setOption('mode', 'combinedmode');
defineCodeMirrorBrunoVariablesMode(variables, 'text/plain', this.props.highlightPathParams);
this.editor.setOption('mode', 'brunovariables');
};
render() {