diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 1166a4a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# top-most EditorConfig file -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = false \ No newline at end of file diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 00c94d4..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Publish Package to NPM - -on: - release: - types: [published] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - run: npm ci - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml deleted file mode 100644 index a898ae0..0000000 --- a/.github/workflows/static.yml +++ /dev/null @@ -1,42 +0,0 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: ["master"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow one concurrent deployment -concurrency: - group: "pages" - cancel-in-progress: true - -jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Pages - uses: actions/configure-pages@v3 - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 - with: - # Upload entire repository - path: '.' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v1 diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c2658d7..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/LICENSE b/LICENSE deleted file mode 100644 index e2db3a4..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Yauheni Pakala - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 44b0266..0000000 --- a/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# highlightjs-lang.js [](https://www.npmjs.com/package/highlightjs-lang.js)  - -[Highlight.js](https://github.com/highlightjs/highlight.js) plugin for display language of syntax highlight. - -[DEMO](https://wcoder.github.io/highlightjs-lang.js/) - -## Install - -### Npm - -```bash -npm i highlightjs-lang.js -``` - -#### Getting the library from CDN - -```html - -``` - -highlightjs-lang.js 1.1.0 is known to work with highlight.js 11.3.1+ - -## Usage - -Download plugin and include file after highlight.js: - -```html - - - - -``` - -Add styles: - -```css -.hljs-lang { - background: #333; - text-align: center; - color: #fff; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -``` - -Initialize plugin after highlight.js: - -```js -hljs.highlightAll(); - -hljs.initLangOnLoad(); // <-- init plugin -``` - -Here’s an equivalent way to calling `initLangBlock` using jQuery: - -```js -$(document).ready(function() { - $('code.hljs').each(function(i, block) { - hljs.initLangBlock(block); - }); -}); -``` - -## Options - -After version 1.1.0 plugin has optional parameter `options` - for custom setup: - -version | name | type | default value | description ---------|---------------|---------|---------------|----------------------- -v1.1.0 | overrideNames | object | {} | [Override the default language names](#overrideNames) -v1.1.1 | fallback | func(str): str | (lang) => lang | [Fallback to convert unknown names](#fallback) - -### Examples of using - -Options can be used in these calls: - -```js -hljs.initLangOnLoad(myOptions); -``` - -```js -hljs.initLangBlock(myCodeBlock, myOptions); -``` - -### overrideNames - -If you want to override the default language name, you can specify a _overridden language names_, in one of the following ways: - -- Specifying the desired value in js code, as in: - -```js -var myOptions = { - // ... - overrideNames: { - cs: 'C#', - }, - // ... -}; -``` - -- Specifying the desired value in `data-lang-name` attribute of `code` element, as in: - -```html -
-
- ...
-
-
-```
-
-In both cases language name will be `C#`.
-
-> [List of default language names](https://github.com/wcoder/highlightjs-lang.js/blob/master/src/highlightjs-lang.js#L4-L10)
-
-### fallback
-
-Specifying the desired format for undeclared language names:
-
-```js
-var myOptions = {
- // ...
- fallback: function (lang) {
- return '~~' + lang;
- },
- // ...
-};
-```
-
-Convert all undeclared language names to names with `~~` prefix:
-
-```
-xyz -> ~~xyz
-```
-
-## Skipping some blocks
-
-(Applies to `hljs.initLangOnLoad()` initialization only.)
-
-If you want to skip some of your `code` blocks (to leave them unnumbered), you can mark them with `.nohljslang` class.
-
-## More plugins
-
-- [highlightjs-line-numbers.js](https://github.com/wcoder/highlightjs-line-numbers.js) — Line numbering plugin.
-
----
-© 2015 Yauheni Pakala | MIT License
diff --git a/bower.json b/bower.json
deleted file mode 100644
index 41e6dc7..0000000
--- a/bower.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "highlightjs-lang.js",
- "version": "1.0.0",
- "homepage": "https://github.com/wcoder/highlightjs-lang.js.git",
- "authors": [
- "Yauheni Pakala #Если Клиент Тогда
Перем СимвольныйКодКаталога = "ля-ля-ля"; //комментарий
@@ -73,8 +50,8 @@ 1C
Обработки.Помощник.ПолучитьФорму("Форма").Открыть();
d = '21.01.2008'
КонецПроцедуры
-
-
+
+
package org.example.dummy {
import org.dummy.*;
@@ -100,7 +77,7 @@ ActionScript
}
}
}
-
+
# rewrite`s rules for wordpress pretty url
LoadModule rewrite_module modules/mod_rewrite.so
@@ -122,7 +99,7 @@ Apache
RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L]
</Location>
-
+
repeat 5 times
if foo is greater than bar then
@@ -139,7 +116,7 @@ AppleScript
do shell script "/bin/echo 'hello'"
-
+
Hello, World!
============
@@ -206,7 +183,7 @@ AsciiDoc
. two thing `i can write code`, and `more` wipee!
NOTE: AsciiDoc is quite cool, you should try it.
-
+
package com.aspectj.syntax;
import org.aspectj.lang.annotation.AdviceName;
@@ -214,7 +191,7 @@ AspectJ
privileged public aspect LoggingAspect percflowbelow(ajia.services.*){
private pointcut getResult() : call(* *(..) throws SQLException) && args(Account, .., int);
@AdviceName("CheckValidEmail")
- before (Customer hu) : getResult(hu){
+ before (Customer hu) : getResult(hu){
System.out.println("Your mail address is valid!");
}
Object around() throws InsufficientBalanceException: getResult() && call(Customer.new(String,String,int,int,int)){
@@ -231,7 +208,7 @@ AspectJ
this.id = id;
}
}
-
+
; hotkeys and hotstrings
#a::WinSet, AlwaysOnTop, Toggle, A
@@ -258,7 +235,7 @@ AutoHotkey
}
return
-
+
;* Title: Block Copy Routines
;* Version: 1.1
@@ -280,7 +257,7 @@ AVR Assembler
.def ramtemp =r1 ;temporary storage register
.def ramsize =r16 ;size of block to be copied
-
+
class ExchRateLoadBatch extends RunBaseBatch {
ExchRateLoad rbc;
@@ -315,7 +292,7 @@ Axapta
return ret;
}
-
+
#!/bin/bash
@@ -348,7 +325,7 @@ Bash
echo -e "# Host $1/$2 :"
}
-
+
++++++++++
[ 3*10 and 10*10
@@ -368,7 +345,7 @@ Brainfuck
rewind and output
[<]>[.>]
-
+
@0xdbb9ad1f14bf0b36; # unique file ID, generated by `capnp id`
@@ -425,7 +402,7 @@ Cap’n Proto
write @2 (startAt :UInt64, data :Data);
truncate @3 (size :UInt64);
}
-
+
user=> (defn f [x y]
#_=> (+ x y))
@@ -435,7 +412,7 @@ Clojure REPL
user=> nil
nil
-
+
; Comment
@@ -456,7 +433,7 @@ Clojure
(when-let [chunk (next-chunk rdr)]
(cons chunk (lazy-seq (chunk-seq rdr)))))
-
+
cmake_minimum_required(VERSION 2.8.8)
project(cmake_example)
@@ -478,7 +455,7 @@ CMake
add_executable(myproject main.cpp mainwindow.cpp)
qt5_use_modules(myproject Widgets)
-
+
grade = (student, period=(if b? then 7 else 6), messages={"A": "Excellent"}) ->
if student.excellentWork
@@ -523,7 +500,7 @@ CoffeeScript
?: [-=]> # function
) ///
-
+
#include <iostream>
#define IABS(x) ((x) < 0 ? -(x) : (x))
@@ -541,7 +518,7 @@ C++
return -2e3 + 12l;
}
-
+
using System;
@@ -575,13 +552,13 @@ C#
internal static void ExceptionFilters()
{
- try
+ try
{
throw new Exception();
}
catch (Exception e) when (e.Message == "My error") { }
}
-
+
@media screen and (-webkit-min-device-pixel-ratio: 0) {
body:first-of-type pre::after {
@@ -609,7 +586,7 @@ CSS
width: 100%;
}
-
+
#!/usr/bin/rdmd
// Computes average line length for standard input.
@@ -656,7 +633,7 @@ D
lines ? sumLength / lines : 0);
}
-
+
library app;
import 'dart:html';
@@ -691,7 +668,7 @@ Dart
Something ${2+3}
""";
-
+
TList = Class(TObject)
Private
@@ -724,7 +701,7 @@ Delphi
End;{Try}
End;{CopyFile}
-
+
Index: languages/ini.js
===================================================================
@@ -757,7 +734,7 @@ Diff
It is important to spell
-
+
{% if articles|length %}
{% for article in articles %}
@@ -776,7 +753,7 @@ Django
Markup is <em>not</em> highlighted within comments.
{% endcomment %}
-
+
# Example instructions from https://docs.docker.com/reference/builder/
FROM ubuntu:14.04
@@ -822,7 +799,7 @@ Dockerfile
ONBUILD ADD . /app/src
-
+
cd \
copy a b
@@ -849,7 +826,7 @@ DOS .bat
xcopy %1\*.* %2
-
+
<h3>Hours</h3>
@@ -859,7 +836,7 @@ Dust
{/users}
</ul>
-
+
defrecord Person, first_name: nil, last_name: "Dudington" do
def name record do # huh ?
@@ -911,7 +888,7 @@ Elixir
greeter.("Bob")
-
+
<%# this is a comment %>
@@ -924,7 +901,7 @@ ERB (Embedded Ruby)
<%% value = 'real string #{@value}' %%>
<%%= available_things.inspect %%>
-
+
1> Str = "abcd".
"abcd"
@@ -954,7 +931,7 @@ Erlang REPL
11> 1.85e+3.
1850
-
+
-module(ssh_cli).
@@ -1017,13 +994,13 @@ Erlang
union_to_list(U1)
))).
-
+
8=FIX.4.2␁9=0␁35=8␁49=SENDERTEST␁56=TARGETTEST␁34=00000001526␁52=20120429-13:30:08.137␁1=ABC12345␁11=2012abc1234␁14=100␁17=201254321␁20=0␁30=NYSE␁31=108.20␁32=100␁38=100␁39=2␁40=1␁47=A␁54=5␁55=BRK␁59=2␁60=20120429-13:30:08.000␁65=B␁76=BROKER␁84=0␁100=NYSE␁111=100␁150=2␁151=0␁167=CS␁377=N␁10000=SampleCustomTag␁10=123␁
8=FIX.4.29=035=849=SENDERTEST56=TARGETTEST34=0000000152652=20120429-13:30:08.1371=ABC1234511=2012abc123414=10017=20125432120=030=NYSE31=108.2032=10038=10039=240=147=A54=555=BRK59=260=20120429-13:30:08.00065=B76=BROKER84=0100=NYSE111=100150=2151=0167=CS377=N10000=SampleCustomTag10=123
-
+
subroutine test_sub(k)
implicit none
@@ -1048,9 +1025,9 @@ Fortran
end subroutine test_sub
-
+
open System
+ open System
// Single line comment...
(*
@@ -1099,7 +1076,7 @@ F#
let mutable inbox = ConcurrentQueue<'a>()
let awaitMsg = new AutoResetEvent(false)
-
+
G-code (ISO 6983)
O003 (DIAMOND SQUARE)
N2 G54 G90 G49 G80
@@ -1133,7 +1110,7 @@ G-code (ISO 6983)
N28 VZOFZ=652.9658
%
-
+
Gherkin
# language: en
Feature: Addition
@@ -1161,7 +1138,7 @@ Gherkin
| 2 | 5 | add | 7 |
| 0 | 40 | add | 40 |
-
+
GLSL
// vertex shader
#version 150
@@ -1201,7 +1178,7 @@ GLSL
gl_FragColor = vec4(ex_Color, 1.0);
}
-
+
Go
package main
@@ -1238,7 +1215,7 @@ Go
return
}
-
+
Gradle
apply plugin: 'android'
@@ -1303,7 +1280,7 @@ Gradle
android.buildTypes.release.signingProperties = null
}
-
+
Groovy
#!/usr/bin/env groovy
package model
@@ -1362,7 +1339,7 @@ Groovy
}
}
-
+
Haml
!!! XML
%html
@@ -1379,7 +1356,7 @@ Haml
~variable4
The current year is #{DataTime.now.year}.
-
+
Handlebars
<h3>Hours</h3>
@@ -1389,7 +1366,7 @@ Handlebars
{{/each}}
</ul>
-
+
Haskell
{-# LANGUAGE TypeSynonymInstances #-}
module Network.UDP
@@ -1430,7 +1407,7 @@ Haskell
pingUDPPort :: Socket -> SockAddr -> IO ()
pingUDPPort s a = sendTo s (Strict.singleton 0) a >> return ()
-
+
Haxe
// quicksort example from http://haxe.org/doc/snip/quicksort
@@ -1462,7 +1439,7 @@ Haxe
}
}
-
+
HTTP
POST /task?id=1 HTTP/1.1
Host: example.org
@@ -1471,7 +1448,7 @@ HTTP
{"status": "ok", "extended": true}
-
+
Ini
;Settings relating to the location and loading of the database
[Database]
@@ -1486,7 +1463,7 @@ Ini
Glob=autoexec_*.ini
AskAboutIgnoredPlugins=0
-
+
Java
/**
* @author John Smith <john.smith@example.com>
@@ -1524,7 +1501,7 @@ Java
}
}
-
+
JavaScript
import {x, y} as p from 'point';
const ANSWER = 42;
@@ -1564,7 +1541,7 @@ JavaScript
export $initHighlight;
-
+
JSON
[
{
@@ -1579,7 +1556,7 @@ JSON
}
]
-
+
Julia
using Profile
@@ -1629,7 +1606,7 @@ Julia
return 5s / 2
end
-
+
Kotlin
import kotlin.lang.test
@@ -1638,13 +1615,13 @@ Kotlin
}
fun xxx() : Int {
- return 888
+ return 888
}
public fun main(args : Array<String>) {
}
-
+
Lasso
<?LassoScript
/* Lasso 8 */
@@ -1694,7 +1671,7 @@ Lasso
^}
?>
-
+
Less
/*
Using the most minimal language subset to ensure we
@@ -1729,7 +1706,7 @@ Less
color: rgba(98, 76 /* or 54 */, 231, .75);
}
-
+
Lisp
#!/usr/bin/env csi
@@ -1753,7 +1730,7 @@ Lisp
(let ((x 10) (y 20))
(print (+ x y))
)
-
+
LiveCode
<?rev
@@ -1786,7 +1763,7 @@ LiveCode
--| Location: ./system/application/controllers/blog.lc
----------------------------------------------------------------------
-
+
LiveScript
# take the first n objects from a list
take = (n, [x, ...xs]:list) -->
@@ -1827,7 +1804,7 @@ LiveScript
|> sort-by \id
|> JSON.stringify
-
+
Lua
--[[
Simple signal/slot implementation
@@ -1862,7 +1839,7 @@ Lua
[[ string
]] ]=] ]==]
-
+
Makefile
# Makefile
@@ -1872,13 +1849,13 @@ Makefile
.PHONY: main clean
main:
- @echo "Building main facility..."
- build_main $(BUILDDIR)
+ @echo "Building main facility..."
+ build_main $(BUILDDIR)
clean:
- rm -rf $(BUILDDIR)/*
+ rm -rf $(BUILDDIR)/*
-
+
Markdown
# hello world
@@ -1904,7 +1881,7 @@ Markdown
2. two thing `i can write code`, and `more` wipee!
-
+
Mathematica
(* ::Package:: *)
@@ -1921,7 +1898,7 @@ Mathematica
EndPackage[]
-
+
Matlab
n = 20; % number of points
points = [random('unid', 100, n, 1), random('unid', 100, n, 1)];
@@ -1969,7 +1946,7 @@ Matlab
cell2flatten = {1,2,3,4,5};
flattenedcell = cat(1, cell2flatten{:});
-
+
MEL
proc string[] getSelectedLights()
@@ -1997,7 +1974,7 @@ MEL
return $selectedLights;
}
-
+
Mercury
% "Hello World" in Mercury.
:- module hello.
@@ -2024,7 +2001,7 @@ Mercury
else Ys = Ys0 , Zs = [X | Zs0]
).
-
+
Mizar
::: ## Lambda calculus
@@ -2112,7 +2089,7 @@ Mizar
by A3,TARSKI:def 1,TREES_1:def 2;
hence thesis by A4;
end;
-
+
Monkey
#IMAGE_FILES="*.png|*.jpg"
#SOUND_FILES="*.wav|*.ogg"
@@ -2152,7 +2129,7 @@ Monkey
End
End
-
+
Nginx
user www www;
worker_processes 2;
@@ -2202,7 +2179,7 @@ Nginx
}
}
-
+
Nimrod
import module1, module2, module3
@@ -2227,7 +2204,7 @@ Nimrod
var normalstring = "asdf"
let a: uint32 = 0xFFaF'u32
-
+
Nix
{ stdenv, foo, bar ? false, ... }:
@@ -2254,7 +2231,7 @@ Nix
};
}
-
+
NSIS
/*
NSIS Scheme
@@ -2290,7 +2267,7 @@ NSIS
FunctionEnd
-
+
Objective C
#import <UIKit/UIKit.h>
#import "Dependency.h"
@@ -2336,7 +2313,7 @@ Objective C
@end
-
+
OCaml
(* This is a
multiline, (* nested *) comment *)
@@ -2362,7 +2339,7 @@ OCaml
method private move d = x <- x + d
end;;
-
+
Oxygene
namespace LinkedList;
@@ -2421,7 +2398,7 @@ Oxygene
end.
-
+
Parser3
@CLASS
base
@@ -2458,7 +2435,7 @@ Parser3
# Isn't comment
$result[$.hash_item1[one] $.hash_item2[two]]
-
+
Perl
# loads object
sub load
@@ -2493,7 +2470,7 @@ Perl
=head1 NAME
POD till the end of file
-
+
pf
# from the PF FAQ: http://www.openbsd.org/faq/pf/example1.html
@@ -2539,7 +2516,7 @@ pf
pass in on $int_if
-
+
PHP
require_once 'Zend/Uri/Http.php';
@@ -2594,7 +2571,7 @@ PHP
datahere */
datahere
-
+
PowerShell
$initialDate = [datetime]'2013/1/8'
@@ -2608,7 +2585,7 @@ PowerShell
$username = [System.Environment]::UserName
} until ($rollingDate -ge [datetime]'2013/12/31')
-
+
Processing
import java.util.LinkedList;
import java.awt.Point;
@@ -2628,7 +2605,7 @@ Processing
background(255);
}
-
+
Python profile
261917242 function calls in 686.251 CPU seconds
@@ -2639,7 +2616,7 @@ Python profile
153900 1.296 rrule.py:399(_iter)
304393/151570 0.963 rrule.py:102(_iter_cached)
-
+
Prolog
mergesort([],[]). % special case
mergesort([A],[A]).
@@ -2653,7 +2630,7 @@ Prolog
split([A],[A],[]).
split([A,B|R],[A|Ra],[B|Rb]) :- split(R,Ra,Rb).
-
+
Protocol Buffers
package languages.protobuf;
@@ -2678,7 +2655,7 @@ Protocol Buffers
rpc FirstMatch(CustomerRequest) returns (CustomerResponse);
rpc AllMatches(CustomerRequest) returns (CustomerResponse);
}
-
+
Puppet
class hg_punch::library {
@@ -2784,7 +2761,7 @@ Puppet
}
-
+
Python
@requires_authorization
def somefunc(param1='', param2=0):
@@ -2799,7 +2776,7 @@ Python
>>> message = '''interpreter
... prompt'''
-
+
Q
select time, price by date,stock from quote where price=(max;price)fby stock
data:raze value flip trade
@@ -2810,7 +2787,7 @@ Q
nor:{$[x=2*n:x div 2;raze sqrt[-2*log n?1f]*/:(sin;cos)@\:(2*pi)*n?1f;-1_.z.s 1+x]}
mode:{where g=max g:count each group x} // mode function
-
+
R
library(ggplot2)
@@ -2882,7 +2859,7 @@ R
`"test"`
-
+
RenderMan RIB
FrameBegin 0
Display "Scene" "framebuffer" "rgb"
@@ -2910,7 +2887,7 @@ RenderMan RIB
WorldEnd
FrameEnd
-
+
Roboconf
# This is a comment
import toto.graph;
@@ -2919,55 +2896,55 @@ Roboconf
# Facet
##
facet VM {
- installer: iaas;
+ installer: iaas;
}
# Components
VM_ec2 {
- facets: VM;
- children: cluster-node, mysql;
+ facets: VM;
+ children: cluster-node, mysql;
}
VM_openstack {
- facets: VM;
- children: cluster-node, mysql;
+ facets: VM;
+ children: cluster-node, mysql;
}
cluster-node {
- alias: a cluster node;
- installer: puppet;
- exports: ip, port, optional-property1, optional_property2;
- imports: cluster-node.ip (optional), cluster-node.port (optional), mysql.ip, mysql.port;
+ alias: a cluster node;
+ installer: puppet;
+ exports: ip, port, optional-property1, optional_property2;
+ imports: cluster-node.ip (optional), cluster-node.port (optional), mysql.ip, mysql.port;
}
mysql {
- alias: a MySQL database;
- installer: puppet;
- exports: ip, port;
+ alias: a MySQL database;
+ installer: puppet;
+ exports: ip, port;
}
##
# Normally, instances are defined in another file...
##
instance of VM_ec2 {
- name: VM_;
- count: 3;
- my-instance-property: whatever;
-
- instance of cluster-node {
- name: cluster node; # An in-line comment
- }
+ name: VM_;
+ count: 3;
+ my-instance-property: whatever;
+
+ instance of cluster-node {
+ name: cluster node; # An in-line comment
+ }
}
instance of VM_openstack {
- name: VM_database;
-
- instance of mysql {
- name: mysql;
- }
+ name: VM_database;
+
+ instance of mysql {
+ name: mysql;
+ }
}
-
+
RenderMan RSL
#define TEST_DEFINE 3.14
/* plastic surface shader
@@ -2985,7 +2962,7 @@ RenderMan RSL
Ci *= Oi;
}
-
+
Ruby
class A < B; def self.create(object = User) object end end
class Zebra; def inspect; "X#{2 + self.object_id}" end end
@@ -3016,7 +2993,7 @@ Ruby
2.0.0p0 :001 > ['some']
=> ["some"]
-
+
Oracle Rules Language
//This is a comment
ABORT "You experienced an abort.";
@@ -3055,7 +3032,7 @@ Oracle Rules Language
HNDL_1_ADD_VAL_MSG = INTDADDVMSG(HNDL_1,"Missing (Status Code 9) values found");
EMPTY_HNDL = INTDCREATEHANDLE('05/03/2006 00:00:00', '05/03/2006 23:59:59', 3600, "Y", "0", " ");
-
+
Rust
use std;
@@ -3113,7 +3090,7 @@ Rust
}
}
-
+
Scala
case class Person(name: String, age: Int)
@@ -3160,7 +3137,7 @@ Scala
y <- 0 until 100
} yield (x + y) * 33.33
-
+
Scheme
;; Calculation of Hofstadter's male and female sequences as a list of pairs
@@ -3191,7 +3168,7 @@ Scheme
lst)
#f)))
-
+
Scilab
// A comment
function I = foo(dims, varargin)
@@ -3208,7 +3185,7 @@ Scilab
bar_matrix = [ "Hello", "world" ];
foo_matrix = [1, 2, 3; 4, 5, 6];
-
+
SCSS
@import "compass/reset";
@@ -3283,7 +3260,7 @@ SCSS
@content;
}
}
-
+
Smali
.class public Lcom/test/Preferences;
.super Landroid/preference/PreferenceActivity;
@@ -3361,7 +3338,7 @@ Smali
return-void
.end method
-
+
Smalltalk
Object>>method: num
"comment 123"
@@ -3403,7 +3380,7 @@ Smalltalk
sorted add: rnd next]].
Transcript cr; show: 'Time for SortedCollection: ' , time printString , ' msecs'
-
+
SML
(* list.sml
*
@@ -3501,27 +3478,27 @@ SML
| find pred (a::rest) = if pred a then SOME a else (find pred rest)
fun filter pred [] = []
- | filter pred (a::rest) = if pred a then a::(filter pred rest)
+ | filter pred (a::rest) = if pred a then a::(filter pred rest)
else (filter pred rest)
fun partition pred l = let
fun loop ([],trueList,falseList) = (rev trueList, rev falseList)
- | loop (h::t,trueList,falseList) =
+ | loop (h::t,trueList,falseList) =
if pred h then loop(t, h::trueList, falseList)
else loop(t, trueList, h::falseList)
in loop (l,[],[]) end
- fun exists pred = let
+ fun exists pred = let
fun f [] = false
| f (h::t) = pred h orelse f t
in f end
- fun all pred = let
+ fun all pred = let
fun f [] = true
| f (h::t) = pred h andalso f t
in f end
- fun tabulate (len, genfn) =
+ fun tabulate (len, genfn) =
if len < 0 then raise Size
else let
fun loop n = if n = len then []
@@ -3543,7 +3520,7 @@ SML
end (* structure List *)
-
+
SQL
BEGIN;
CREATE TABLE "topic" (
@@ -3564,7 +3541,7 @@ SQL
but who cares?
*/
COMMIT
-
+
Stata
program define gr_log
version 6.0
@@ -3603,10 +3580,10 @@ Stata
local ln = ln
}
}
-
+
* add mlibs in the new adopath to the index
mata: mata mlib index
-
+
STEP Part 21 (ISO 10303-21)
ISO-10303-21;
HEADER;
@@ -3642,7 +3619,7 @@ STEP Part 21 (ISO 10303-21)
ENDSEC;
END-ISO-10303-21;
-
+
Stylus
@import "nib"
@@ -3670,7 +3647,7 @@ Stylus
color #F0F0F0 !important
width 100%
-
+
Swift
extension MyClass : Interface {
class func unarchiveFromFile<A>(file : A, (Int,Int) -> B) -> SKNode? {
@@ -3684,7 +3661,7 @@ Swift
}
}
-
+
Tcl
package json
@@ -3713,7 +3690,7 @@ Tcl
expr {$x>1 && ![regexp {^(oo+?)\1+$} [string repeat o $x]]}
}
-
+
TeX
\documentclass{article}
\usepackage[koi8-r]{inputenc}
@@ -3733,7 +3710,7 @@ TeX
$$
\end{document}
-
+
Thrift
namespace * thrift.test
@@ -3775,7 +3752,7 @@ Thrift
string testString(1: string thing),
oneway void testInit()
}
-
+
Twig
{% if posts|length %}
{% for article in articles %}
@@ -3799,7 +3776,7 @@ Twig
Markup is <em>not</em> highlighted within comments.
#}
-
+
TypeScript
class MyClass {
public static myValue: string;
@@ -3817,7 +3794,7 @@ TypeScript
myArray.forEach(() => {
// fat arrow syntax
});
-
+
Vala
using DBus;
@@ -3866,7 +3843,7 @@ Vala
foo.method ();
}
-
+
VB.NET
Import System
Import System.IO
@@ -3911,7 +3888,7 @@ VB.NET
End Class
End Namespace
-
+
VBScript in HTML
<body>
<%
@@ -3921,7 +3898,7 @@ VBScript in HTML
%>
</body>
-
+
VBScript
' creating configuration storage and initializing with default values
Set cfg = CreateObject("Scripting.Dictionary")
@@ -3952,7 +3929,7 @@ VBScript
end if
end if
next
-
+
Verilog
`timescale 1ns / 1ps
@@ -3992,7 +3969,7 @@ Verilog
endmodule
-
+
VHDL
/*
* RS-trigger with assynch. reset
@@ -4036,7 +4013,7 @@ VHDL
nQ <= not QT;
end architecture behaviour;
-
+
Vim Script
if foo > 2 || has("gui_running")
syntax on
@@ -4054,7 +4031,7 @@ Vim Script
endwhile
endfunction
-
+
Intel x86 Assembly
section .text
extern _MessageBoxA@16
@@ -4097,7 +4074,7 @@ Intel x86 Assembly
section .drectve info
db '/defaultlib:user32.lib /defaultlib:msvcrt.lib '
-
+
XL
import Animate
import SeasonsGreetingsTheme
@@ -4128,9 +4105,9 @@ XL
scale 0.2, 0.3, 0.3
rectangle 0, 0, 100000, 1154
-
+
HTML, XML
- <?xml version="1.0"?>
+ <?xml version="1.0"?>
<response value="ok" xml:lang="en">
<text>Ok</text>
<comment html_allowed="true"/>
@@ -4157,12 +4134,6 @@ HTML, XML
-
-
-This project is maintained by Yauheni Pakala and Community.
-This page hosted on GitHub Pages.
-
-
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: