Skip to content

Added missing keyword: AUTHOR #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
node_modules
.vscode
.idea
13 changes: 0 additions & 13 deletions .vscode/settings.json

This file was deleted.

64 changes: 9 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,16 @@
# COBOL - syntax highlighting for [highlight.js](https://highlightjs.org/)
[![version](https://badgen.net/npm/v/highlightjs-enterprisecobol)](https://www.npmjs.com/package/highlightjs-enterprisecobol) [![license](https://badgen.net/badge/license/apache2.0)](./LICENSE)

![version](https://badgen.net/npm/v/highlightjs-cobol) ![license](https://badgen.net/badge/license/apache2.0)
# Enterprise COBOL - syntax highlighting for highlight.js

COBOL is a statically typed, imperative, procedural programming language with support for object oriented programming. First released in 1959, it's still used today in many banking and financial companies due to it's decimal arithmetic, making it well suited for financial calculations.
Based on the otterkit package: https://github.com/otterkit/highlightjs-cobol, contains several improvements as of the writing:
Better regex (several bugs fixed and minor optimization done), better TypeScript support, and AUTHOR has been added to the list of reserved words so it will be highlighted (just like IBM Z Open Editor's highlighter does).

## Usage

Warning: This syntax highlighter is designed to work with __fixed-form only__ and won't work
properly with free-form COBOL code.
Simply include the Highlight.js library in your webpage or Node app, then load this module.
# Installation
Simply add highlightjs-enterprisecobol to your dependencies in your package.json (requires highlight.js to be installed). Install using npm

### Static website or simple usage
# Links

Simply load the module after loading Highlight.js. You'll use the minified version found in the `dist` directory. This module is just a CDN build of the language, so it will register itself as the Javascript is loaded.
The official site for the Highlight.js library is https://highlightjs.org/

```html
<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script type="text/javascript" charset="UTF-8"
src="/path/to/highlightjs-cobol/dist/cobol.min.js"></script>
<script type="text/javascript">
hljs.highlightAll();
</script>
```

### Using directly from the UNPKG CDN

```html
<script type="text/javascript"
src="https://unpkg.com/highlightjs-cobol/dist/cobol.min.js"></script>
```

- More info: <https://unpkg.com>

### With Node or another build system

If you're using Node / Webpack / Rollup / Browserify, etc, simply require the language module, then register it with Highlight.js.

```javascript
var hljs = require('highlightjs');
var hljsCOBOL = require('highlightjs-cobol');

hljs.registerLanguage("cobol", hljsCOBOL);
hljs.highlightAll();
```


## License

highlightjs-cobol is released under the Apache 2.0 License. See [LICENSE][1] file
for details.

### Author / Maintainer

Gabriel Gonçalves <[email protected]>

## Links

- The official site for the Highlight.js library is <https://highlightjs.org/>.
- The Highlight.js GitHub project: <https://github.com/highlightjs/highlight.js>

[1]: https://github.com/otterkit/highlightjs-cobol/blob/master/LICENSE
The Highlight.js GitHub project: https://github.com/highlightjs/highlight.js
12 changes: 0 additions & 12 deletions dist/cobol.es.min.js

This file was deleted.

12 changes: 0 additions & 12 deletions dist/cobol.min.js

This file was deleted.

Loading