1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-12 17:26:17 +00:00

updated to code to pass test

This commit is contained in:
Nguyễn Việt Hưng
2018-10-02 21:43:45 +07:00
parent 14fec7473a
commit 8936d8b517
4 changed files with 7 additions and 4 deletions

View File

@@ -483,7 +483,10 @@ export default class MarkdownPreview extends React.Component {
eventEmitter.on('export:save-md', this.saveAsMdHandler)
eventEmitter.on('export:save-html', this.saveAsHtmlHandler)
eventEmitter.on('print', this.printHandler)
eventEmitter.on('config-renew', this.rewriteIframe.bind(this))
eventEmitter.on('config-renew', () => {
this.markdown.updateConfig()
this.rewriteIframe()
})
}
componentWillUnmount () {

View File

@@ -265,9 +265,9 @@ class Markdown {
}
// FIXME We should not depend on global variable.
window.md = this.md
ee.on('config-renew', () => {
this.updateConfig = () => {
config = ConfigManager.get()
})
}
}
render (content) {

View File

@@ -31,7 +31,7 @@ Generated by [AVA](https://ava.li).
`<ul>␊
<li class="taskListItem"><input type="checkbox" id="checkbox-2" /> Unchecked</li>␊
<li class="taskListItem"><input type="checkbox" checked id="checkbox-3" /> Checked</li>␊
<li class="taskListItem checked"><input type="checkbox" checked id="checkbox-3" /> Checked</li>␊
</ul>␊
`