Comments (7)
👍 I love this feature in the Chrome extension. I use it all the time.
from docgist.
I think you pointed me to the code over there already. It's such a low hanging fruit, I should just get it done.
from docgist.
@mojavelinux This reminds me ... should source-language
affect plain literalblocks, which are not really source
blocks?
from docgist.
@mojavelinux See http://gist.asciidoctor.org/?github-asciidoc%2Fasciidoc%2F%2Fdoc%2Fsource-highlight-filter.txt&source-language=python&source-highlighter=pygments#_source_code_paragraphs
I'm actually not sure why the language
attribute in the document isn't picked up when the page is rendered without overrides: http://gist.asciidoctor.org/?github-asciidoc%2Fasciidoc%2F%2Fdoc%2Fsource-highlight-filter.txt#_source_code_paragraphs
But anyhow, locking source-language
from the URL works fine.
If language
is set as well, it will win. (expected?)
I added pygments
as highlighter to see if the sanity check still worked.
(see the output in the console)
from docgist.
But anyhow, locking source-language from the URL works fine.
If language is set as well, it will win. (expected?)
I suppose so. language
is the deprecated attribute and source-language
is now preferred. We're missing a test in core to validate what happens if both are specified. I guess we could say it's a bit undefined atm.
from docgist.
should source-language affect plain literalblocks, which are not really source blocks?
It shouldn't, though we are planning a change in this area. See asciidoctor/asciidoctor#1117. Even then, if a block is marked as listing
or literal
it should not get source highlighting.
from docgist.
Ok, I'll leave the literal blocks out for now, as the HTML generated for the different variants is identical.
I tried to collect some variations of this here: http://gist.asciidoctor.org/?b60dad2c320ecbea4694
from docgist.
Related Issues (20)
- Absolute image paths on GitHub HOT 7
- Link to included document not working. HOT 9
- Get interdocument xrefs working HOT 2
- Support Bitbucket and GitLab HOT 5
- Upgrade to Asciidoctor.js 1.5.3 HOT 24
- Render footer with document metadata HOT 1
- Support files in Google Drive HOT 1
- Support the stylesheet attribute HOT 2
- Get a short url for the current page
- Convert problem in Safari HOT 26
- Make boolean attributes a toggle button in the Attributes menu
- Allow organizing maintained docs
- Where are fp- links documents stored? HOT 1
- Support interactive checkbox
- Allow setting garbage collection schedule on submitting a new gist. HOT 1
- PROJECT_REQUIRES_IMPORT HOT 4
- Google will discontinue the goo.gl on March 30, 2019 HOT 3
- Edit feature is not working HOT 1
- Footnote syntax doesn't work according to Asciidoctor documentation? HOT 1
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 docgist.