Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code block theme does not work after latest update #40

Open
sharmasourabh opened this issue Jun 2, 2019 · 2 comments
Open

Code block theme does not work after latest update #40

sharmasourabh opened this issue Jun 2, 2019 · 2 comments

Comments

@sharmasourabh
Copy link

Version: 0.11.17
Version prior to update: 0.11.15
OS: Windows 10

After update to 0.11.17, code block theme stopped working. I am using the default theme for editor and overall UI, therefore found no issue with them. However, I saw, editor theme issue is already opened.

Analysis:
I found that there is code change in main.js after v0.11.15 at following code block. A new theme check has been added. Theme path hold the full path of theme path, instead of relative path. Therefore, when it gets added to appPath, a wrong path location is formed. Therefore, code block theme does not reflect.

            key: 'GetCodeThemeLink',
	    value: function GetCodeThemeLink(name) {
	      var theme = _consts2.default.THEMES.find(function (theme) {
	        return theme.name === name;
	      });
	      if (theme) {
	        return appPath + '/' + theme.path;
	      } else {
	        return appPath + '/node_modules/codemirror/theme/elegant.css';
	      }
	    }

Fix:
Returned value inside theme check should return the theme.path as shown below:

              ...
	      if (theme) {
	        return theme.path;
	      } else {
              ...
@solariz
Copy link

solariz commented Jun 3, 2019

Can Confirm that.

@themattgabriel
Copy link

themattgabriel commented Jul 23, 2019

Here's the workaround that worked for me.

  1. Go to %USERPROFILE%\AppData\Local\boost\app-0.11.17\resources\app\compiled.

  2. Edit main.js.

  3. Look for:

    path: path.join(directory.split(/\//g).slice(-3).join('/'), file),
    
  4. Change it to:

    path: path.join(CODEMIRROR_THEME_PATH, file),
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants