This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(markdown): render custom HTML via component * test(markdown): custom HTML component * feat(markdown): internalize compact heading normalization * test(markdown): compact heading expectations * build * chore(markdown): nix loose mode * build * chore(markdown): refactor normalization - nix normalize exports - rename normalize to "setup" - internalize option merging (defaults with user-passed config) in setup method - use setup in every transformer method * test(markdown): fix tests for new setup method * BUILD * refactor(markdown): wrap table in div.table * build * fix(markdown): style callout styles for Ffx * BUILD * chore(markdown): update component classes * test(markdown): fix linting issues * test(markdown): update callout + table expectations * Update packages/markdown/components/Callout/index.jsx
- Loading branch information
1 parent
42ca29a
commit de94ab0
Showing
18 changed files
with
923 additions
and
652 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const React = require('react'); | ||
const PropTypes = require('prop-types'); | ||
|
||
class HTMLBlock extends React.Component { | ||
render() { | ||
const { html } = this.props; | ||
return <div className="rdmd-html" dangerouslySetInnerHTML={{ __html: html }} />; | ||
} | ||
} | ||
|
||
HTMLBlock.propTypes = { | ||
html: PropTypes.any, | ||
}; | ||
|
||
module.exports = sanitize => { | ||
sanitize.tagNames.push('html-block'); | ||
sanitize.attributes['html-block'] = ['html']; | ||
return HTMLBlock; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.