In the beginning, I just planned to install a code-highlighter plugin for my Blog. After the testing on Syntaxhighlighter and Prism, I decided to add a language support of PostScript.
The string data of PostScript has "(" and ")" as the deliminator: string begin and string end.
According the red book:
- "A literal text string consists of an arbitrary number of characters enclosed in ( and ). Any characters may appear in the string other than (, ), and \, which must be treated specially. Balanced pairs of parentheses in the string require no special treatment."
There are some more lines to describe about \, the "escape". I just leave them in the book.
So, the issue is, I need to figure out, how to use regex to retrieve the PostScript strings from the source code to give them a color.
I need to run and debug my code together with Prism (maybe Syntaxhighlighter) and to see if I can find some solution.
So, I dig into finding a Javascript development environment for me to accomplish my though.
Since Prism and Syntaxhighlighter use the environment of Node.js, Visual Studio Code + Node.js is a reasonable choice.
Just download Visual Studio Code form this link, install it and the plugin "VS Code for Node.js - Development Pack", and follow the instruction of the web page "Node.js Tutorial in VS Code", a working environment has been setup.
The steps have been tested on Windows 10 and OS X. Both work fine.
It is just the beginning. I need to learn and get familiar with it.
About the installation of Node.js, please refer to my blog "Node.js"
Have fun!
So, the issue is, I need to figure out, how to use regex to retrieve the PostScript strings from the source code to give them a color.
I need to run and debug my code together with Prism (maybe Syntaxhighlighter) and to see if I can find some solution.
So, I dig into finding a Javascript development environment for me to accomplish my though.
Since Prism and Syntaxhighlighter use the environment of Node.js, Visual Studio Code + Node.js is a reasonable choice.
Just download Visual Studio Code form this link, install it and the plugin "VS Code for Node.js - Development Pack", and follow the instruction of the web page "Node.js Tutorial in VS Code", a working environment has been setup.
The steps have been tested on Windows 10 and OS X. Both work fine.
It is just the beginning. I need to learn and get familiar with it.
About the installation of Node.js, please refer to my blog "Node.js"
Have fun!
Comments