Skip to content
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

Extend the parser to support paragraph underneath section item #16

Closed
MangelMaxime opened this issue Apr 15, 2022 · 1 comment
Closed

Comments

@MangelMaxime
Copy link
Contributor

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
    }
    ```

* Responsive mode is now implemented supported in the standard layout

<img style="width: 75%; margin-left: 12.5%;" src="/Nacara/assets/changelog/0_2_0/desktop_preview.png" alt="Desktop preview">
<br/>
<br/>
<div class="has-text-weight-bold has-text-centered">Desktop preview</div>
<br/>

* Build mode has been added to Nacara it active by default. You can start in watch mode by adding `--watch` or `-w` to the CLI

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
Copy link
Contributor Author

I am closing as #22 fix this problem.

We just need a new release when possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant