Coder Social home page Coder Social logo

simplesyntaxhighlighter's Introduction

Simple Syntax Highlighter

This is a code syntax highlighter developed as part of a school project at ISTIA, an engineering school in Angers (France).

You can check out the demo here:

http://yjajkiew.github.io/SimpleSyntaxHighlighter

What it does

The principle is simple: it formats and colors your code, according to the language you select.

To go further, we created a few themes so you can visualize your code in different color styles.

The program is flexible: you can add a programming language by simply creating a js file and adapting the program script.js. You can take a look at the files lang-javascript.js to understand what to describe about the language.

Technologies used

This project uses mainly JavaScript with HTML and CSS. JQuery 1.11.0 has also been used to develop the project faster.

The main program is contained in script.js.

The supported languages are contained in the files lang-*****.js

The themes are the css files style-*****.css.

The other HTML and CSS files are here to show how to use the program and how to adapt it to your needs. Do not hesitate to look at the demo to understands what it does for the user. You'll find in tests.txt some examples of code your can insert in the demo page.

Team

TO DO

The development of this project is not done yet and has been temporarily suspended. Here's a list of what we want to finish:

Task State
Allow users to choose between "format" and "color" (or both) to do
Display number of lines next to the code in progress
Fix Bug #1 to do
Fix Bug #2 to do
Fix Bug #3 in progress
Get rid of JQuery to do
Minify script.js last thing to do

Bugs

Here's a list of bugs we have encountered:

Number Description
#1 Comments begin by // and finish by \n, problem detecting the carriage return
#2 Problem detecting <?, <?php, ?> for the PHP language
#3 Coloration doesn't work when switching languages

simplesyntaxhighlighter's People

Contributors

yjajkiew avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

simplesyntaxhighlighter's Issues

Syntax highlighting issue

I have found an issue of your plugin.

plz check below

Input

// my input
alert('a');

var a = 'd';
var b = 'd';

if(a == b) {
alert(a);
try {
alert('test');
} catch(e) { ; }
}

Output

Output

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.