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

[Android] Fix Markdown ordered lists to honour start #6310

Merged
merged 9 commits into from
Sep 13, 2021

Conversation

almedina-ms
Copy link
Contributor

@almedina-ms almedina-ms commented Sep 3, 2021

Related Issue

Fixes #6238

Description

Context: In the Android rendered all texts to be rendered are preprocessed to convert the markdown components to HTML

In the android renderer, any text containing ". " is parsed as the start of an ordered markdown list, this approach works most of the time but due to some limitations the ordered lists would always start at 1 as we would miss context on the html tag attributes, for this reason this PR overrides the ContentHandler class behaviour inside of the currently used XMLReader to retrieve the attributes for any given html element and thus providing a correct starting number for any ordered list.

Sample Card

v1.5/Test/TextBlock.Markdown.NumberStart.json

How Verified

  1. A unit test was added to verify the rendered TextBlocks include the right number
Microsoft Reviewers: Open in CodeFlow

@ghost ghost removed the Needs: Author Feedback label Sep 3, 2021
@ghost ghost removed the Needs: Author Feedback label Sep 13, 2021
@almedina-ms almedina-ms merged commit da84677 into main Sep 13, 2021
@almedina-ms almedina-ms deleted the user/almedina-ms/Android_FixMDolNumbering branch September 13, 2021 21:57
michaelfarnsworth pushed a commit to michaelfarnsworth/AdaptiveCards that referenced this pull request Nov 10, 2022
* Working version with reflection

* Add ContentHandler overrides and add tests

* Fix handled code

* Fix test break

* Add more tests
rankush pushed a commit to rankush/AdaptiveCards that referenced this pull request May 8, 2024
* Working version with reflection

* Add ContentHandler overrides and add tests

* Fix handled code

* Fix test break

* Add more tests
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

Successfully merging this pull request may close these issues.

[Rendering] Numbered item in TextBlock always displaying number 1
3 participants