Skip to content

Commit

Permalink
Desktop, Mobile: Fixes #3698: Always use light theme for notes in HTM…
Browse files Browse the repository at this point in the history
…L mode
  • Loading branch information
laurent22 committed Sep 21, 2020
1 parent 9e05fa5 commit 3ac4fbe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ReactNativeClient/lib/joplin-renderer/HtmlToHtml.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const htmlUtils = require('./htmlUtils');
const utils = require('./utils');
const noteStyle = require('./noteStyle');
const Setting = require('lib/models/Setting');
const { themeStyle } = require('lib/theme');
const memoryCache = require('memory-cache');
const md5 = require('md5');

Expand Down Expand Up @@ -44,7 +46,10 @@ class HtmlToHtml {
return []; // TODO
}

async render(markup, theme, options) {
// Note: the "theme" variable is ignored and instead the light theme is
// always used for HTML notes.
// See: https://github.com/laurent22/joplin/issues/3698
async render(markup, _theme, options) {
options = Object.assign({}, {
splitted: false,
}, options);
Expand Down Expand Up @@ -84,7 +89,8 @@ class HtmlToHtml {
};
}

let cssStrings = noteStyle(theme);
const lightTheme = themeStyle(Setting.THEME_LIGHT);
let cssStrings = noteStyle(lightTheme);

if (options.splitted) {
const splitted = this.splitHtml(html);
Expand Down

0 comments on commit 3ac4fbe

Please sign in to comment.