Comments (7)
Could you please try
./RegeIn/style/html-theme.css
I did so and it doesn't work and gives the same error message.
Even when I place the file directly in my workspace root so I don't need to use \
, \\
or /
I get the same error message.
from asciidoctor-vscode.
I was able to reproduce it. It's not a path issue it's a Content Security Policy
index.html:1 Refused to load the stylesheet 'https://fonts.googleapis.com/css?family=Nova+Round' because it violates the following Content Security Policy directive: "style-src 'self' 'self' https://*.vscode-cdn.net 'unsafe-inline' data:". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.
index.html:1 Refused to load the stylesheet 'https://fonts.googleapis.com/css?family=Noto+Sans:300,600italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700' because it violates the following Content Security Policy directive: "style-src 'self' 'self' https://*.vscode-cdn.net 'unsafe-inline' data:". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.
index.html:1 Refused to load the stylesheet 'https://cdn.jsdelivr.net/gh/asciidoctor/[email protected]/data/stylesheets/asciidoctor-default.css' because it violates the following Content Security Policy directive: "style-src 'self' 'self' https://*.vscode-cdn.net 'unsafe-inline' data:". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.
You can workaround this issue by disabling the CSP.
from asciidoctor-vscode.
We probably need to add https:
in style-src
and script-src
:
asciidoctor-vscode/src/asciidoctorWebViewConverter.ts
Lines 67 to 75 in 2a145bf
from asciidoctor-vscode.
Could you please try ./RegeIn/style/html-theme.css
from asciidoctor-vscode.
Just to confirm its not isolated - I have had the same issue with asciidoc.preview.style
as Mutantpenguin and get the same error message - albeit, I am using my own custom stylesheet and not the one Mutantpenguin is using.
It was working, and working well.
from asciidoctor-vscode.
I can't see what changed between 3.1.5 and 3.1.7 🤔
@cunka could you please share your error message? maybe I can find a pattern... are you on Windows? do you use \\
? did you try to replace \\
by /
(since it's a URI and not a file path)
from asciidoctor-vscode.
Yes - I'm a WINDOWS 10 user.
Had the paths set up as \
- as per this other bug i mentioned. https://github.com/asciidoctor/asciidoctor-vscode/issues/777#issuecomment-1676297112
It was working and I could use the webview to edit/modify the stylesheet all in VSCode and then it stopped working.
Outside of the VSCode updates, I'm wondering if something was enforced by Microsoft in a recent OS update.
I'm glad you have found a solution.
from asciidoctor-vscode.
Related Issues (20)
- Test "Antora support with single documentation component" is flaky HOT 1
- Preview stops working if reference to bibliography entry exists in 3.2.1 HOT 5
- `npm install` reports 9 vulnerabilities on `master` HOT 1
- Quotes have a dark overlay in preview but not in .pdf HOT 4
- `package.json` and `package-lock.json` are not in sync after `prepare branch for development [no ci]` HOT 2
- Add test coverage reporting
- Project README / CHANGELOG is Markdown instead of AsciiDoc
- Asciidoc: Export Document as PDF --> prompts user every time HOT 1
- Preview scroll offset wrong when includes are used HOT 1
- Make error more prominent
- Preview scroll offset wrong when working with tables HOT 1
- Disabling SSL verification HOT 2
- Syntax highlighting broken if a variable is used with bash source
- Preview not rendering checkboxes in checklist
- Ctrl + Alt + V break HOT 1
- [Windows Only][Antora Support] `include::example$something` not working on windows
- Cant use asciidoctor in my own extension as soon as i active asciidoctor-vscode extension HOT 7
- Antora preview doesn't work if version is not specified in antora.yml
- Callout and Syntax Highlighting in code blocks
- Right-click causes incorrect multi-select behavior HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciidoctor-vscode.