Administrator
|
Hi all,
I'm putting some more content on the openscad.org website (aka relaunch) and I'm looking for ways of syntax highlighting OpenSCAD scripts. Looking around, prettify.js looks most widely used (https://code.google.com/p/google-code-prettify), but adding languages to it wasn't immediately intuitive to me. Has anyone done this before, or are anyone up to the challenge of writing an .scad mode for prettify.js (or any other syntax highlighter) ? Cheers, -Marius _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
I have seen some in the Wiki... they are just using "source lang=javascript" (i.e. processing scad as though it were javascript) On Wed, Apr 17, 2013 at 12:07 AM, Marius Kintel <[hidden email]> wrote: Hi all, _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
Administrator
|
On 2013-04-17, at 07:40 , Don Bright wrote:
> I have seen some in the Wiki... they are just using "source lang=javascript" (i.e. processing scad as though it were javascript) > > http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Conditional_and_Iterator_Functions > Hm, they use some kind of Mediawiki PHP plugin to do that. Not sure I want to go that route.. Prettify.js still looks like the best starting point. It also looks like a bunch of people out there has been wanting this for blogs without finding any. -Marius _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
On 24-4-2013 3:41, Marius Kintel wrote: > On 2013-04-17, at 07:40 , Don Bright wrote: > >> I have seen some in the Wiki... they are just using "source lang=javascript" (i.e. processing scad as though it were javascript) >> >> http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Conditional_and_Iterator_Functions >> > Hm, they use some kind of Mediawiki PHP plugin to do that. Not sure I want to go that route.. > Prettify.js still looks like the best starting point. > It also looks like a bunch of people out there has been wanting this for blogs without finding any. > > -Marius it, because I know (and like) it from the Dolphin Smalltalk programming environment. (Not for the Web, but maybe as external, or internal, editor) -Rob van Lopik _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
Administrator
|
On 2013-04-24, at 05:48 , Rob van Lopik wrote:
> Just one other suggestion: Scintilla (www.scintilla.org). My original request was for _displaying_ openscad code on the web (for documentation/eductional purpose), not editing it. But, yes QScintilla looks interesting for a potential GUI integration: http://www.riverbankcomputing.co.uk/software/qscintilla/intro -Marius _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
Apparently, syntax highlighting for the web is still unsolved.
The best I found was highlight.js , but as you can see there: https://benjaminwand.github.io/verbose-cv/projects/bezier_curves.html the syntax highlighting is *very* weird. And now I'm wondering whether I should try rewriting half of highlight.js or keep searching further or forget about it and live with the weird looks. In other languages highlight.js works well, it just doesn't know OpenSCAD. Any ideas? -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
Free forum by Nabble | Edit this page |