ionide / KeepAChangelog

Parser and MSBuild Targets for using Keep-A-Changelog-formatted Changelogs in your Build
MIT License
30 stars 4 forks source link

Extend the parser to support paragraph underneath section item #16

Closed MangelMaxime closed 9 months ago

MangelMaxime commented 2 years ago

Prelude: I saw the issue #4 but I think the case described in my issue is a bit different

The following is a valid Changelog, but Ionide.KeepAChangelog cannot parse this changelog.

It stops after the line * Layout system has been added

# Changelog
All notable changes to this project will be documented in this file.

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).

## 1.0.0 - 2021-09-26

### Added

* Layout system has been added

    User can add `layouts` node to `nacara.js`, it takes an object.

    Example:

    ```js
    {
        default: standard.Default,
        changelog: standard.Changelog
    }
Desktop preview



Desktop preview


In Nacara changelog parser, I created a CategoryBody DUs which allow to represent either a list item or a free form text:

    type CategoryBody =
        | ListItem of string
        | Text of string

    type OtherItem =
        {
            ListItem : string
            TextBody : string option
        }

    [<RequireQualifiedAccess>]
    type CategoryType =
        | Added
        | Changed
        | Deprecated
        | Removed
        | Improved
        | Fixed
        | Security
        | Unknown of string

        member this.Text
            with get () =
                match this with
                | Added -> "Added"
                | Changed -> "Changed"
                | Deprecated -> "Deprecated"
                | Removed -> "Removed"
                | Improved -> "Improved"
                | Fixed -> "Fixed"
                | Security -> "Security"
                | Unknown tag -> tag

    type Version =
        { Version : string option
          Title : string
          Date : DateTime option
          Categories : Map<CategoryType, CategoryBody list>
          OtherItems : OtherItem list }

Supporting the free form text underneath a list item allow for some really powerful changelog (display in my case):

https://mangelmaxime.github.io/Nacara/changelogs/nacara.html#0.2.0

MangelMaxime commented 9 months ago

I am closing as #22 fix this problem.

We just need a new release when possible.