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

new 'List' feature #119

Open
ThomasPerezBlanco opened this issue Apr 26, 2022 · 6 comments
Open

new 'List' feature #119

ThomasPerezBlanco opened this issue Apr 26, 2022 · 6 comments

Comments

@ThomasPerezBlanco
Copy link

I envisage the implementation to be something like this:

## Create a single-level bullet list of items
List [-Items] [string[]]

## Create a single-level numbered list of items
List [-Items] [string[]] -Numbered

## Create a multi-level bullet list
List [-ScriptBlock] {
    Item 'apples'
    List {
        Item 'Granny smith'
        Item 'Pink lady'
    }
    Item 'bananas'
    Item 'oranges'
    List {
       Item 'Jaffa'
    }
}

## Create a multi-level numbered list
List -Numbered [-ScriptBlock] {
    Item 'apples' # 1
    List {
        Item 'Granny smith' # 1.1
        Item 'Pink lady' # 1.2
    }
    Item 'bananas' # 2
    Item 'oranges' # 3
    List {
        Item 'Jaffa' # 3.1
    }
}

Are there any other implementations or options that are needed?

Originally posted by @iainbrighton in #105 (comment)

Hello,

First of all, thank you for your work.
I saw in this post from 2020 that you were developing this feature.
Do you plan to release this feature?
For my part, I need two formats: Unordered and Ordered List

Thank you.

Cordially,

Thomas.

@iainbrighton
Copy link
Owner

Sorry for the tardy response. Yes, I have this functionality working in the Issue105 branch (used internally) and will look to publish it soon.

@datenschieber
Copy link

Sorry for the tardy response. Yes, I have this functionality working in the Issue105 branch (used internally) and will look to publish it soon.

Hi, do you have a release date for the new version?
Thanks!

@iainbrighton
Copy link
Owner

@datenschieber this functionality is now available in the dev branch for testing. I won't publish it until I have confirmation from numerous sources that it's not "broken"!

@tpcarman
Copy link

Great work @iainbrighton! 👏 I'm starting to test this now.

My initial feedback is that I think the following needs to be added to the comment based help to provide some clarity.

  • Bullet styles which can be used - Square, Dash, Disc, Circle. Are there any others?
  • The limitations for bullet/number formats in Word and HTML. The lack of Word support for the mixed bullet/number formats at the same level caught me out initially. I found the answer in the Example script, but not the command based help.

@iainbrighton
Copy link
Owner

  • Bullet styles which can be used - Square, Dash, Disc, Circle. Are there any others?

Word supports pretty much anything, but these are unordered list options supported in the Html standard(s). I don't forsee any need to extend this functionality for only Word output. If we had a custom renderer (see below), this might be a possibility.

  • The limitations for bullet/number formats in Word and HTML. The lack of Word support for the mixed bullet/number formats at the same level caught me out initially. I found the answer in the Example script, but not the command based help.

I'll add some additional help here.

Word doesn't support mixed bullet/number types at the same level so there's not a lot we can do here.

As for supporting Html rendering of custom number formats; it's not insurmountable, but we'd have to create a custom Html table to support this. The current implementation uses the default ordered list option available in the Html standard(s) which is a good start - additional support could be added later.

@tpcarman
Copy link

Word supports pretty much anything, but these are unordered list options supported in the Html standard(s). I don't forsee any need to extend this functionality for only Word output. If we had a custom renderer (see below), this might be a possibility.

I'm not suggesting we extend it beyond the default bullet styles, just simply documenting what the default bullet styles are in the command based help.

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

4 participants