Cannot replace with multiple lines
See original GitHub issueIt seems that bumpversion doesn’t work with multiline string.
Here is my CHANGELOG.md
:
## Unreleased ##
- xxxx
## 0.0.2 -- 2015-12-08 ##
- yyyy
And here is my .bumpversion.cfg
:
[bumpversion:file:CHANGELOG.md]
search = ## Unreleased ##
replace = ## Unreleased ##
## {new_version} - {utcnow:%Y-%m-%d} ##
After running bumpversion, the expected changelog is:
## Unreleased ##
## 0.0.3 -- 2015-12-09 ##
- xxxx
## 0.0.2 -- 2015-12-08 ##
- yyyy
But the actual content is:
## Unreleased ##
## 0.0.3 -- 2015-12-09 ##
- xxxx
## 0.0.2 -- 2015-12-08 ##
- yyyy
And .bumpversion.cfg
is changed:
[bumpversion:file:CHANGELOG.md]
search = ## Unreleased ##
replace = ## Unreleased ##
## {new_version} - {utcnow:%Y-%m-%d} ##
Bumpversion removes the empty line.
How to replace current version with multiline string?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:5
- Comments:5
Top Results From Across the Web
Multiple line replacing doesn't work? - Community - Notepad++
The 'Replace with' field does not allow you to paste multiple lines of text. It gets cut off after the first line. You...
Read more >How to multi-line "Replace in files..." in Notepad++
It's easy to do multiline replace in Notepad++. You have to use \n to represent the newline in ... Restart N++ and press...
Read more >Replace multi line long text in multiple files (notepad++ or ...
I tried ToolBucket plugin for notepad++ but it can not replace in all files inside a folder, need to open all files in...
Read more >Visual Studio 2019 how to add the Find and Replace Multi Lines
If you want Multiline Search and Replace in vs2019, try to customize search syntax by using .NET regular expressions and I believe the...
Read more >replacing multiple lines with multiple lines in ascii file
Learn more about replace string, multiple lines MATLAB. ... I can not do it one line at the time because the single lines...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes,
RawConfigParser
in py2 doesn’t recognize empty lines in multiple lines.Instead of wrapping
RawConfigParser
, shall we switch to another parser, e.g., a toml parser?Just in case this is helpful to someone that finds this:
rst
instead ofmd
..bumpversion.cfg
instead ofsetup.cfg
if you plan on building in python 3