Skip to content

Commit

Permalink
Fix; skip newlines before changelog title
Browse files Browse the repository at this point in the history
  • Loading branch information
mdwint committed Aug 5, 2022
1 parent b81a123 commit 3ec5c65
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## Unreleased
## 0.3.2 - 2022-08-05

### Fixed

- Strip whitespace between version numbers and dates.
- Skip newlines before changelog title.


## 0.3.1 - 2022-08-04
Expand Down
2 changes: 1 addition & 1 deletion ocdc/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.1"
__version__ = "0.3.2"
1 change: 1 addition & 0 deletions ocdc/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def __call__(self) -> ast.Changelog:
def changelog(p: Parser) -> ast.Changelog:
c = ast.Changelog()

skip_newlines(p)
if p.expect(TokenType.HASH, TokenType.TEXT):
c.title = p.peek(1).text

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ocdc"
version = "0.3.1"
version = "0.3.2"
description = 'A changelog formatter for "people", neat freaks, and sloppy typists.'
authors = ["Matteo De Wint <[email protected]>"]
packages = [{ include = "ocdc" }]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.1
current_version = 0.3.2
commit = True

[flake8]
Expand Down
2 changes: 2 additions & 0 deletions tests/data/strip_whitespace.in.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


# Changelog

All notable changes to this project will be documented in this file.
Expand Down

0 comments on commit 3ec5c65

Please sign in to comment.