mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
don't disrupt \_ in filenames #1158
This commit is contained in:
parent
8c766f81b2
commit
4b2227c71f
4 changed files with 34 additions and 3 deletions
|
@ -415,7 +415,9 @@ def strip_filename(filename, fence):
|
||||||
filename = filename.strip()
|
filename = filename.strip()
|
||||||
filename = filename.strip("`")
|
filename = filename.strip("`")
|
||||||
filename = filename.strip("*")
|
filename = filename.strip("*")
|
||||||
filename = filename.replace("\\_", "_")
|
|
||||||
|
# https://github.com/paul-gauthier/aider/issues/1158
|
||||||
|
# filename = filename.replace("\\_", "_")
|
||||||
|
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,6 @@ def process_markdown(filename, fh):
|
||||||
# Split the content into sections based on '####' headers
|
# Split the content into sections based on '####' headers
|
||||||
sections = re.split(r"(?=####\s)", content)
|
sections = re.split(r"(?=####\s)", content)
|
||||||
|
|
||||||
dump(sections)
|
|
||||||
|
|
||||||
for section in sections:
|
for section in sections:
|
||||||
if "editblock_coder.py" in section or "test_editblock.py" in section:
|
if "editblock_coder.py" in section or "test_editblock.py" in section:
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -27799,3 +27799,12 @@ echo "$message"
|
||||||
@@@ SHELL @@@@@@@@@@@@@@@@@@@@
|
@@@ SHELL @@@@@@@@@@@@@@@@@@@@
|
||||||
bash example.sh
|
bash example.sh
|
||||||
@@@ ENDSHELL @@@@@@@@@@@@@@@@@@@@
|
@@@ ENDSHELL @@@@@@@@@@@@@@@@@@@@
|
||||||
|
|
||||||
|
|
||||||
|
@@@ #### make the change from https://github.com/paul-gauthier/aider/issues/1158 @@@@@@@@@@@@@@@@@@@@
|
||||||
|
@@@ SEARCH: src\mycli\dev\__init__.py @@@@@@@@@@@@@@@@@@@@
|
||||||
|
from .tools import *
|
||||||
|
@@@@@@@@@@@@@@@@@@@@
|
||||||
|
from .tools import *
|
||||||
|
from .project import newpy
|
||||||
|
@@@ REPLACE @@@@@@@@@@@@@@@@@@@@
|
||||||
|
|
22
tests/fixtures/chat-history.md
vendored
22
tests/fixtures/chat-history.md
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
-*- mode: fundamental -*-
|
||||||
>
|
>
|
||||||
> isort....................................................................Passed
|
> isort....................................................................Passed
|
||||||
> black....................................................................Passed
|
> black....................................................................Passed
|
||||||
|
@ -99937,3 +99938,24 @@ world!
|
||||||
|
|
||||||
The here-doc approach makes it easier to add or modify multi-line messages in the future, and it's more readable than escaping newlines in a single string.
|
The here-doc approach makes it easier to add or modify multi-line messages in the future, and it's more readable than escaping newlines in a single string.
|
||||||
|
|
||||||
|
|
||||||
|
#### make the change from https://github.com/paul-gauthier/aider/issues/1158
|
||||||
|
|
||||||
|
|
||||||
|
Thank you for adding the file. Now I can propose the necessary changes. We need to update the `src\mycli\dev\__init__.py` file to import the `newpy` function from the `project` module. Here's the change:
|
||||||
|
|
||||||
|
src\mycli\dev\__init__.py
|
||||||
|
<source>python
|
||||||
|
<<<<<<< SEARCH
|
||||||
|
from .tools import *
|
||||||
|
=======
|
||||||
|
from .tools import *
|
||||||
|
from .project import newpy
|
||||||
|
>>>>>>> REPLACE
|
||||||
|
</source>
|
||||||
|
|
||||||
|
This change imports the `newpy` function from the `project` module, making it available when importing from the `dev` package.
|
||||||
|
|
||||||
|
Now, the `newpy` command should be properly imported and accessible in the main CLI file.
|
||||||
|
|
||||||
|
Is there anything else you'd like me to do or explain regarding this change?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue