-
-
Notifications
You must be signed in to change notification settings - Fork 849
Implement Reader class to parse ChangeLog.md #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Reader class to parse ChangeLog.md #216
Conversation
@estahn you implement really handy module! 👏 |
def parse_heading(heading) | ||
structures = [ | ||
/^## \[(?<version>v.+?)\]\((?<url>.+?)\)( \((?<date>.+?)\))?$/, | ||
/^## (?<version>v.+?)( \((?<date>.+?)\))?$/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@estahn Most of all project uses prefix "v" for version tags, but not all of them.
As example of big projects, that don't use:
- https://github.com/jquery/jquery
- https://github.com/bartaz/impress.js
- https://github.com/jashkenas/backbone
and this project also don't use any prefix for the tag versions.
So, I think it's needed to make char "v" optional in this regex. What do you think?
@skywinder I changed the parser to allow any kind of version number. Also added a bunch of rspec tests and rubocop to check for validity. Travis is currently failing because most of the files are not compliant with rubocop. You could just run Thoughts? |
@estahn thanks for rspec and fixes! Much appreciated! Tell the truth I'm new in ruby. Ans it's my first serious module-based project. And you are motivate me to do it well with your commits!
|
Merged. Thanks for your big effort to cleanup and prettify this project! 👍 |
This will fix "Parsing of existing Change Log file".
Fix #212.