Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

feat(Linkify): Add markdown support #14

Merged
merged 12 commits into from
Feb 19, 2019
Merged

Conversation

jadenlemmon
Copy link
Contributor

Summary:
Adds markdown support. I've experimented with several solutions so far and react-markdown got me closest to what I was trying to accomplish. With react-markdown the links are still parsed as before as well as the additional markdown.

Still a WIP.

@jadenlemmon jadenlemmon requested a review from a team January 9, 2019 02:45
@jadenlemmon
Copy link
Contributor Author

One discussion item is how much markdown is supported? Since the initial thought was just links.

@codecov-io
Copy link

codecov-io commented Jan 10, 2019

Codecov Report

Merging #14 into master will decrease coverage by 6.23%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
- Coverage   74.21%   67.97%   -6.24%     
==========================================
  Files          13       13              
  Lines         159      178      +19     
  Branches       24       27       +3     
==========================================
+ Hits          118      121       +3     
- Misses         30       42      +12     
- Partials       11       15       +4
Impacted Files Coverage Δ
src/Linkify/Linkify.js 100% <100%> (+5%) ⬆️
src/Dropdown/Dropdown.js 44% <0%> (+2.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23ea486...1d794c4. Read the comment docs.

@jadenlemmon
Copy link
Contributor Author

@sappira-inc/engineering
react-markdown has some good control over the markdown by using an allowedTypes prop we can only allow links to start or whatever we choose. lmk thoughts.

Copy link

@choochootrain choochootrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might as well add a snapshot for markdown rendering and then this is g2g from me

@jadenlemmon
Copy link
Contributor Author

@choochootrain Added

Copy link

@choochootrain choochootrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

not sure about the node types we want to allow but i the skipHtml prop should lock out most of the sketchy parts

@kylealwyn
Copy link
Contributor

screen shot 2019-01-15 at 11 10 18 am

Looks like the example is broken. We may need to recursively flatten down Linkify's children.

@jadenlemmon
Copy link
Contributor Author

jadenlemmon commented Jan 15, 2019

@kylealwyn is there a use case for nesting the Linkify component?

@kylealwyn kylealwyn changed the title Add markdown support in Linkify component feat(Linkify): Add markdown support Feb 15, 2019
@kylealwyn kylealwyn merged commit 23b89d1 into master Feb 19, 2019
@kylealwyn kylealwyn deleted the feat/markdown-support branch February 19, 2019 18:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants