mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Minor changes
This commit is contained in:
parent
14fc73b388
commit
8ff1668c8f
@ -45,4 +45,14 @@ describe('htmlUtils', function() {
|
||||
done();
|
||||
});
|
||||
|
||||
it('should return the head and body HTML', async (done) => {
|
||||
const html = '<html><head><style>h1 { font-weight: bold; }</style></head><body><h1>Bonjour</h1></body></html>';
|
||||
const dom = htmlUtils.parse(html);
|
||||
const resultHtml = htmlUtils.headAndBodyHtml(dom);
|
||||
|
||||
expect(resultHtml).toBe('<style>h1 { font-weight: bold; }</style>\n<h1>Bonjour</h1>');
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
@ -670,7 +670,7 @@ class NoteTextComponent extends React.Component {
|
||||
const arg0 = args && args.length >= 1 ? args[0] : null;
|
||||
const arg1 = args && args.length >= 2 ? args[1] : null;
|
||||
|
||||
console.info('Got ipc-message: ' + msg, args);
|
||||
if (percentScroll !== 'percentScroll') console.info('Got ipc-message: ' + msg, args);
|
||||
|
||||
if (msg.indexOf('checkboxclick:') === 0) {
|
||||
// Ugly hack because setting the body here will make the scrollbar
|
||||
|
@ -15,7 +15,7 @@ class HtmlUtils {
|
||||
|
||||
extractImageUrls(html) {
|
||||
if (!html) return [];
|
||||
|
||||
|
||||
const dom = new JSDOM(html);
|
||||
const imgs = dom.window.document.getElementsByTagName('img');
|
||||
const output = [];
|
||||
|
@ -422,7 +422,7 @@ async function initialize(dispatch) {
|
||||
if (Setting.value('env') == 'prod') {
|
||||
await db.open({ name: 'joplin.sqlite' })
|
||||
} else {
|
||||
await db.open({ name: 'joplin-68.sqlite' });
|
||||
await db.open({ name: 'joplin-70.sqlite' });
|
||||
|
||||
// await db.clearForTesting();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user