-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
How to have Atom's rendering layout? #276
Comments
Hello again @Foadsf 😉
I think you need to set the safe mode to "safe" (or "unsafe") in the extension options.
Syntax highlighting should work when safe mode is "safe" (or "unsafe"). You also need to enable syntax highlighting by setting the
In the option pane you can change the theme and/or add custom stylesheets to change the code layout.
Could you please post a screenshot ? |
oh hey, nice to see same great people are taking care of this plugin too :)
This on Google Chrome. On Firefox
I tried all options
WOW! these are awesome. I wish they existed on Atom and VSCode! I'm going with foundation-lime, though it is not exactly as nice as Atom's default. Any way i can export than and import it here?
Here on the Atom's post I have compared them all. Basically the black arrow next to the |
Here's the languages supported out-of-the-box: https://github.com/asciidoctor/asciidoctor-browser-extension/blob/master/src/js/highlight.js
Not really but you can get the files from this repository: https://github.com/asciidoctor/asciidoctor-browser-extension/tree/master/app/css/themes
It's a style issue on Firefox (not related to this extension). In short you should open an issue here: https://github.com/asciidoctor/asciidoctor-stylesheet-factory |
Dear @Mogztter I really appreciate your kind support. You guys are true heroes to provide users with such a nice software just for the love of it :)
The language I am using is Scilab which is indeed in the list of this is lovely! but on FireFox: still lovely but no syntax highlighting :(
It would be great if these three projects (Atom, VSCode and browser addons) could have a same repository for themes. Is this technically possible? |
Asciidoctor's integration with highlight.js does not load all the languages by default. It only loads the languages that are included in the common set. There's an open issue to be able to configure additional languages. See asciidoctor/asciidoctor#3036 |
@mojavelinux strange thing is that Atom has the proper syntax highlighting but the browser addon and vscode don't! |
As I've already explained, these are two separate things. The editor is a completely different technology stack than the preview window. The preview window relies on the syntax highlighting integration provided by Asciidoctor. The default is highlight.js. The linked issue details why not all the languages are loaded by default. |
Nice investigative work! I've submitted a PR to fix this. See asciidoctor/asciidoctor#3156 |
As a workaround, you can do the following:
document.querySelectorAll('pre.highlight > code').forEach((block) => {
hljs.highlightBlock(block);
});
|
@Mogztter awesome. This solved the problem. It would be great if there would be an option on the extension page to select the languages we want and it automatically pull them from the |
Can I close this issue ? I like when an issue only contains a single element so it's easier to focus on one task. For my point of view, the only remaining tasks are:
Did i forget something ? |
@Mogztter I have listed all of the issues in this table. For the moment I have some workarounds. Looking forwards to those pull request. Thanks for your awesome support again. |
With the latest version it's now possible to load grammar for additional source languages as defined by @Foadsf If I missed something, please open a new issue with a single feature request or issue so we can address it. |
First of all thanks for the great job. After some research I think this addon is a very good AsciiDoc viewer so far and I want to suggest it as the recommended viewer for my library. The reasons it is better than VSCode and Atom live preview:
However I have some issues:
The include syntax doesn't work properly. It just puts a link to the included file.
The syntax highlighting inside the code blocks does not work properly. Atom's addon is great in that regard.
and finally the layout for code blocks is not emphasized enough. It would be great if you could add the Atom's layout with the dark code blocks:
Relevant discussion here on VSCode repo and here on Atom's repo.
The text was updated successfully, but these errors were encountered: