iamacup / react-native-markdown-display

React Native 100% compatible CommonMark renderer
MIT License
590 stars 169 forks source link

Omit paragraph wrappers from list item text #104

Closed abirchall closed 4 years ago

abirchall commented 4 years ago

Fixes #101

This updates the style of list_item to match the format from https://www.markdownguide.org/basic-syntax/#lists-1 Namely, that list_item contents do not have vertical margin due to wrapped paragraph tokens.

If folks do want this behavior, they can override the style of *_list_icon or *_list_content.

This change has the added benefit of eliminating the need for platform specific *_list_icon margins and line heights. Horray!

iOS before:

list_ios_before

iOS after:

list_ios_after

Android before:

list_android_before

Android after:

list_android_after