The Cobra command line has a new -highlight option that will take the source files you give and emit them into gen-html\foo.cobra.html as syntax highlighted files. Here is an example.
The stylesheet is styles-cobra-shl.css (shl=syntax highlighting) in Cobra's Source\ directory.
See SyntaxHighlighter.cobra in the source if you are interested in the implementation or the remaining TODO list in the file's doc string.
Note that there is also a Pygments highlighter which will always be important because several 3rd party tools use Pygments.
Forums
cobra -highlight <files>
5 posts
• Page 1 of 1
Re: cobra -highlight <files>
Hi, Chuck
small issue report.
Please add a head for a 2byte character.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
small issue report.
Please add a head for a 2byte character.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- arisawa
- Posts: 51
Re: cobra -highlight <files>
Done for both -highlight and -doc. Thanks.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: cobra -highlight <files>
is '-highlight' option there that in -help information?
also,there is a problem with the following code.
FileNotFoundException: 'MainWrapper.cobra'
also,there is a problem with the following code.
FileNotFoundException: 'MainWrapper.cobra'
- Code: Select all
class Person
var _name as String = "-----"
var __address as String = "xxxx"
var __telephone as String = "000-0000"
var age as int = 0
pro name as String
get
return _name
set
_name = value
pro address as String
get
return __address
set
pass
def setNameAge(n as String, a as int)
.name = n
.age = a
def dumpData
trace _name
trace __address
trace __telephone
trace .age
def main
p = Person()
print p.name
p.setNameAge("john doe", 30)
print p.name
print p.address
p.dumpData
- arisawa
- Posts: 51
Re: cobra -highlight <files>
Fixed and fixed. Thanks for the report.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 38 guests