Skip to content

Commit da65160

Browse files
committed
Add calculator examples to edit format instructions for Python and JavaScript
- to EDIT_FORMAT_INSTRUCTIONS_BEFORE_AFTER add 'created file' example that doesn't use conflict blocks - to EDIT_FORMAT_INSTRUCTIONS_WHOLE add 'created file' example - to EDIT_FORMAT_INSTRUCTIONS_TRUNCATED add 'created file' example
1 parent 030c0b6 commit da65160

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

‎apps/editor/src/constants/edit-format-instructions.ts‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ def show_greeting():
1212
print(GREETING)
1313
\`\`\`
1414
15+
Created a simple calculator with addition and subtraction.
16+
17+
### Created file: \`src/examples/calculator.py\`
18+
19+
\`\`\`python
20+
def add(a, b):
21+
return a + b
22+
23+
def subtract(a, b):
24+
return a - b
25+
\`\`\`
26+
1527
### Deleted file: \`src/examples/weekdays.py\`
1628
1729
### Renamed file: \`src/examples/math_utils.py\` (old) \`src/examples/calculator.py\` (new)`
@@ -52,6 +64,20 @@ Greet user saying "Hello, World!", for a duration of 5 seconds.
5264
<!-- ... --->
5365
\`\`\`
5466
67+
Created a simple calculator with addition and subtraction.
68+
69+
### Created file: \`src/examples/calculator.js\`
70+
71+
\`\`\`javascript
72+
function add(a, b) {
73+
return a + b;
74+
}
75+
76+
function subtract(a, b) {
77+
return a - b;
78+
}
79+
\`\`\`
80+
5581
### Deleted file: \`src/examples/weekdays.js\`
5682
5783
### Renamed file: \`src/examples/math-tools.js\` (old) \`src/examples/calculator.js\` (new)`
@@ -109,6 +135,18 @@ WISHES = "Have a nice day!"
109135
>>>>>>>
110136
\`\`\`
111137
138+
Created a simple calculator with addition and subtraction.
139+
140+
### Created file: \`src/examples/calculator.py\`
141+
142+
\`\`\`python
143+
def add(a, b):
144+
return a + b
145+
146+
def subtract(a, b):
147+
return a - b
148+
\`\`\`
149+
112150
### Deleted file: \`src/examples/weekdays.py\`
113151
114152
### Renamed file: \`src/examples/math_utils.py\` (old) \`src/examples/calculator.py\` (new)`

0 commit comments

Comments
 (0)