CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.88k stars 1.38k forks source link

TextToolbar ordered List numeration error #2759

Open marianstdt opened 5 years ago

marianstdt commented 5 years ago

I'm submitting a...

Bug report (I searched for similar issues and did not find one)

Current behavior

When using a Ordered List in Rich Text format, the numbers jump from "9", to ":" and then "21" (First attached Image), and repeats the same every 10 elements.

When on Markdown if you insert ten elements and apply the ordered list property, but delete the first two, in the text editor your list will start with the number 3, while the Markdown Preview will start on number 1(Second attached Image).

c53e19d5-cbfe-4591-bd9a-2f9b6638ba31

9a58ddbd-b3d6-40eb-a711-e8f6037717f6

Expected behavior

It should order the numbers correctly.

Minimal reproduction of the problem with instructions

When Opening the sample app, go to Control -> TextToolbar, press the ordered lists button, and insert more than ten items.

Environment

Nuget Package(s): 5.0.0

Package Version(s): 

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [x] October 2018 Update (17763)
- [ ] Insider Build (build number: )

App min and target version:
- [x] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [x] October 2018 Update (17763)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Mobile
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [x] 2017 (version: Community 15.9.5 )
- [ ] 2017 Preview (version: )
michael-hawker commented 5 years ago

Thanks @marianstdt, I can reproduce as well for the rich text format. @WilliamABradley any ideas on where this code lives?

The Markdown output is expected according to the original spec, but not common mark. I did notice we don't support the ) as an ordered list delimiter, so we should probably file a separate issue for this parsing piece.

windowstoolkitbot commented 5 years ago

This issue seems inactive. It will automatically be closed in 14 days if there is no activity.

windowstoolkitbot commented 5 years ago

This issue seems inactive. It will automatically be closed in 14 days if there is no activity.

avknaidu commented 5 years ago

@michael-hawker @marianstdt this is correct as per spec. However to satisfy the requirement of the OP, i would suggest a new property that will maintain the order of the list from whatever entered as text. What say?

michael-hawker commented 5 years ago

@avknaidu I think adhering to the MD specs are fine. We do have the bug with the toolbar code we should fix, and then also maybe add the 1) delimiter support. Otherwise, I think we're good.

windowstoolkitbot commented 5 years ago

This issue seems inactive. It will automatically be closed in 14 days if there is no activity.