Skip to content

Commit

Permalink
Change to use separate export of uriTransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 13, 2021
1 parent 8737eac commit aeee9ac
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
*/

import {ReactMarkdown} from './lib/react-markdown.js'
export {uriTransformer} from './lib/uri-transformer.js'

export default ReactMarkdown
2 changes: 0 additions & 2 deletions lib/react-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,3 @@ ReactMarkdown.propTypes = {
transformImageUri: PropTypes.func,
components: PropTypes.object
}

ReactMarkdown.uriTransformer = uriTransformer
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ render(<ReactMarkdown remarkPlugins={[gfm]} children={markdown} />, document.bod
[`./uri-transformer.js`][uri], optional)\
URL to use for links.
The default allows only `http`, `https`, `mailto`, and `tel`, and is
available at `ReactMarkdown.uriTransformer`.
exported from this module as `uriTransformer`.
Pass `null` to allow all URLs.
See [security][]
* `transformImageUri` (`(src, alt, title) => string`, default:
Expand Down

0 comments on commit aeee9ac

Please sign in to comment.