react-markdown-heading
react-markdown-heading copied to clipboard
Code refactoring to improve readability
Why need refactoring
When I add hyperlinkPrefix
in https://github.com/kyoncy/react-markdown-heading/pull/21/,
I thought "There are too many function dependencies..."
For instance
-
ReactMarkdownHeading
component depends onparseHeadingText
. -
parseHeadingText
depends onextractText
. -
extractText
depends onparseText
. -
parseText
depends onparseText
itself...