Skip to content

Allow using special char#135

Merged
ekohl merged 1 commit into
c4urself:masterfrom
mckelvin:handle-special-char
Aug 31, 2020
Merged

Allow using special char#135
ekohl merged 1 commit into
c4urself:masterfrom
mckelvin:handle-special-char

Conversation

@mckelvin
Copy link
Copy Markdown
Contributor

I was trying to write a replace for a changelog in the follow format.

    # https://keepachangelog.com/en/1.0.0/

    ## [Unreleased]
    ### Added
    - Foobar

    ## [0.0.1] - 2014-05-31
    ### Added
    - This CHANGELOG file to hopefully serve as an evolving example of a
      standardized open source project CHANGELOG.
    """))

but later I found the # is treated as the default comment prefix by the ConfigParser.

This PR is trying to workaround the issue by substituting the # using {#}. Please check the test case for details.

--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
 # https://keepachangelog.com/en/1.0.0/

 ## [Unreleased]
+
+## [1.6.0] - 2019-03-19
 ### Added
 - Foobar

Copy link
Copy Markdown
Collaborator

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ekohl ekohl added the feature label Aug 31, 2020
@ekohl ekohl merged commit 8e6db23 into c4urself:master Aug 31, 2020
@mckelvin mckelvin deleted the handle-special-char branch September 1, 2020 01:37
@florisla florisla added this to the v1.0.1 milestone Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants