Article
· May 30, 2022 3m read

ObjectScript Syntax For GitLab

Hi Community,

Recently, I migrated a series of Objectscript repositories from XML to UDL format.
After the migration, I was a bit disappointed by the presentation on the GitLab web interface.

Since Objectscript syntax is supported by GitHub, I thought It would be also supported by GitLab. Unfortunately, the library used by GitLab to highlight the code does not have an extension to support Objectscript.

GitLab uses the library Rouge, which can highlight over 200 languages. This is a library written in Ruby (see the GitHub page), but Objectscript is not in the list.
So, I decided to develop an Objectscript extension.

The Rouge fork is available on my GitHub page.
For testing purposes, I prepared a repository objectscript-syntax-for-gitlab to easily build a container with a Ruby environment ready and a test page.

Current development status:

Features Status
&JS<> Implemented
&HTML<> Implemented
&SQL<> Partial
Method with language Python Implemented
Method with language Javascript Implemented
XData contains XML Implemented
XData contains JSON Implemented
Storage (XML definition) Implemented
Query Partial
Label in Method Implemented
Routine Implemented
CSP Not Yet
Macro file (INC) Not Yet

Installation

Simply clone the repo, pull the image and start:

git clone https://github.com/lscalese/objectscript-syntax-for-gitlab.git
cd objectscript-syntax-for-gitlab
docker pull ghcr.io/lscalese/objectscript-syntax-for-gitlab:latest
docker-compose up -d

Test

When the container is started you can open this URL to show a test page: http://localhost:9592/objectscript

It’s possible to select a different theme at the bottom of the page.

If you want to test the highlight with your own code, you can use this small form: http://localhost:9692/csp/irisapp/lscalese.objectscript4gitlab.test.cls
(the login/password is the default _system/SYS)

Copy\paste your code in the text area and click submit. Your code will be open on a new tab Warning: The browser could block the opening of the new page. Please accept if needed.

The button “reset” allows restoring the default test page.

Please don’t hesitate to send me feedback of your tests by creating an issue on my GitHub. I need input to detect bugs and improve as much as possible before sending a pull request to Rouge.

Hope this project will be useful for the community and deserves your support ;)

Thank you for reading.

Discussion (1)3
Log in or sign up to continue