Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-gupta-ij committed Nov 8, 2024
1 parent ffb818f commit 0bc67dd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { InputAdornment, TextField } from '@mui/material';
import { Search } from '@mui/icons-material';

const CommandSearch = ({ commands, setCommands, setSearchTerms }) => {

const ref = React.useRef(null);
const ref = React.useRef(null);
const handleSearch = (event) => {
const { value } = event.target;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,10 @@ const CommandsDrawer = ({ open, toggleDrawer, handleInsertCommand }) => {
<Typography variant={'body1'} mb={4}>
This is a list of commands that can be used in the editor.
</Typography>
<CommandSearch commands={allCommands} setCommands={setCommands}
setSearchTerms={setSearchTerms}
/>
<CommandSearch commands={allCommands} setCommands={setCommands} setSearchTerms={setSearchTerms} />
</Box>
<Box sx={{ flexGrow: 1, overflowY: 'auto' }}>
<CommandsTable commands={commands} handleInsertCommand={handleInsertCommand}
searchTerms={searchTerms}
/>
<CommandsTable commands={commands} handleInsertCommand={handleInsertCommand} searchTerms={searchTerms} />
</Box>
</Drawer>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const parseCommandVariables = (command) => {
const variablePattern = /<([^>]+)>/g;
const variables = [];
let match;
while ((match = variablePattern.exec(command)) !== null) {
variables.push(match[1]);
}
return variables;
};
2 changes: 1 addition & 1 deletion src/components/EditorCommon/config/Rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function btnconfig(commandId, beutifyCommandId, docsCommandId) {
const terminal = apiDocs.getRequestDocs(codeBlocks[i].blockText.split('\n')[0]);
if (terminal) {
terminal.operationId = terminal.operationId.replace(/_/g, '-');
terminal.tags[0] = terminal.tags[0].toLowerCase()
terminal.tags[0] = terminal.tags[0].toLowerCase();
const docsURL = DOCS_BASE_URL + terminal.tags[0] + '/' + terminal.operationId;
lenses.push({
range,
Expand Down

0 comments on commit 0bc67dd

Please sign in to comment.