JSPM

@blobmaster/mini-j-highlight

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q32365F
  • License GPL V3

A highlight tool that could higlight any language in a best effort manner.

Package Exports

  • @blobmaster/mini-j-highlight

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@blobmaster/mini-j-highlight) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

mini-j-highlight

.___  ___.  __  .__   __.  __                 __          __    __   __    _______  __    __   __       __    _______  __    __  .___________.
|   \/   | |  | |  \ |  | |  |               |  |        |  |  |  | |  |  /  _____||  |  |  | |  |     |  |  /  _____||  |  |  | |           |
|  \  /  | |  | |   \|  | |  |  ______       |  |  ______|  |__|  | |  | |  |  __  |  |__|  | |  |     |  | |  |  __  |  |__|  | `---|  |----`
|  |\/|  | |  | |  . `  | |  | |______|.--.  |  | |______|   __   | |  | |  | |_ | |   __   | |  |     |  | |  | |_ | |   __   |     |  |     
|  |  |  | |  | |  |\   | |  |         |  `--'  |        |  |  |  | |  | |  |__| | |  |  |  | |  `----.|  | |  |__| | |  |  |  |     |  |     
|__|  |__| |__| |__| \__| |__|          \______/         |__|  |__| |__|  \______| |__|  |__| |_______||__|  \______| |__|  |__|     |__|     
                                                                                                                                            

Description

hilighter which work with every programming language in a best effort manner.

About

  • best effort highlighter
  • minimal size
  • no language detection
    • may work with every programming language
    • use a fixed list of key-words
  • customizable with simples CSS
    • using attributes

Exemples

A SQL exemple :

select * from toto
where id > 42 ;

With mini-j-highlight

A JS exemple :

import miniJHighlight from './mini-j-highlight.js';
window.addEventListener('load', function(event) {
    document.querySelectorAll('[type="mini-j-highlight"]').forEach((e)=>{
        const container = document.createElement("div" );
        e.parentNode.insertBefore(container, e);
        e.style.display='none';
        miniJHighlight(container, e.innerText);
    });
}); 

With mini-j-highlight

A Java exemple :

/* Affichage console */
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, world!"); 
    }
}

With mini-j-highlight