Revision history [back]
Expand syntax highlighting support to allow named language?
Askbot includes support for syntax highlighting using google-code-prettify (GCP), but doesn't offer an option to specify a particular language.
As a result, this bash code formats nicely:
#!/bin/bash
echo "Foo bar"
But this BASIC code has some problems:
Sub FooBar
Dim CountInteger As Integer 'For counting a thing
Dim OtherInteger As Integer
CountInteger = Blah / 2
REM Do some stuff here
OtherInteger = 5
End Sub
There is already a mechanism within GCP to specify a language:
"You can specify a language by specifying the language extension along with the prettyprint class like so: <pre class="prettyprint lang-html"> ...
Here's the markdown-ish syntax GitHub uses to indicate language-specific syntax-highlighting:
```ruby ask = "bot" puts "#{ask}: loopbackoffice" ```
This sounds like a relatively straight-forward improvement.
Expand syntax highlighting support to allow named language?
Askbot includes support for syntax highlighting using google-code-prettify (GCP), but doesn't offer an option to specify a particular language.
As a result, this bash code formats nicely:
#!/bin/bash
echo "Foo bar"
But this BASIC code has some problems:
Sub FooBar
Dim CountInteger As Integer 'For counting a thing
Dim OtherInteger As Integer
CountInteger = Blah / 2
REM Do some stuff here
OtherInteger = 5
End Sub
There is already a mechanism within GCP to specify a language:
"You can specify a language by specifying the language extension along with the prettyprint class like so: <pre class="prettyprint lang-html"> ...
Here's the markdown-ish syntax GitHub uses to indicate language-specific syntax-highlighting:
```ruby ask = "bot" puts "#{ask}: loopbackoffice" ```
This sounds like a relatively straight-forward improvement.