diff --git a/index.js b/index.js index dd2c439..580df37 100644 --- a/index.js +++ b/index.js @@ -162,7 +162,10 @@ const parseLang = (str) => { .replace(/\}$/, ''); const attrs = selectors.length ? selectorToAttrs(selectors) : {}; - const className = classNames(lang ? `language-${lang}` : '', attrs.class); + const className = classNames( + lang ? `language-${lang}` : 'language-unknown', + attrs.class, + ); const { legend = '', ...restAttrs } = attrs; return { @@ -202,7 +205,11 @@ module.exports = (options = {}) => (tree) => { ); }, ''); - const code = h('code', {}, u('raw', raw)); + const code = h( + 'code', + { className: `language-${lang || 'unknown'}` }, + u('raw', raw), + ); const pre = h( 'div', { className: 'remark-highlight' }, diff --git a/test/outputs/autolinker.html b/test/outputs/autolinker.html index 190ef7f..e962997 100644 --- a/test/outputs/autolinker.html +++ b/test/outputs/autolinker.html @@ -1,6 +1,8 @@
-
/**
+  
/**
  * Prism: Lightweight, robust, elegant syntax highlighting
  * MIT license http://www.opensource.org/licenses/mit-license.php/
  * @author Lea Verou http://lea.verou.me
@@ -14,7 +16,7 @@
 
@font-face {
+  >@font-face {
   src: url(http://lea.verou.me/logo.otf);
   font-family: 'LeaVerou';
 }
@@ -23,7 +25,7 @@
 
<!-- Links in HTML, woo!
+  ><!-- Links in HTML, woo!
 Lea Verou http://lea.verou.me or, with Markdown, Lea Verou -->
 <img src="http://prismjs.com/img/spectrum.png" alt="In attributes too!" />
 <p>Autolinking in raw text: http://prismjs.com</p>
@@ -32,6 +34,6 @@
 
[Text you want to see](http://url-goes-here.com)
+  >[Text you want to see](http://url-goes-here.com)
 
diff --git a/test/outputs/autolinker.png b/test/outputs/autolinker.png index bd71ee0..245e8f2 100644 Binary files a/test/outputs/autolinker.png and b/test/outputs/autolinker.png differ diff --git a/test/outputs/command-line.html b/test/outputs/command-line.html index 729e578..25433cc 100644 --- a/test/outputs/command-line.html +++ b/test/outputs/command-line.html @@ -5,7 +5,7 @@ data-host="remotehost" data-output="2,4-8" class="language-bash" - >pwd + >pwd /usr/home/chris/bin ls -la total 2 diff --git a/test/outputs/command-line.png b/test/outputs/command-line.png index d73f4de..40a02b8 100644 Binary files a/test/outputs/command-line.png and b/test/outputs/command-line.png differ diff --git a/test/outputs/data-uri-highlight.html b/test/outputs/data-uri-highlight.html index 030e139..d239f85 100644 --- a/test/outputs/data-uri-highlight.html +++ b/test/outputs/data-uri-highlight.html @@ -2,7 +2,7 @@
div {
+  >div {
   border: 40px solid transparent;
   border-image: 33.334%
   padding: 1em;
diff --git a/test/outputs/data-uri-highlight.png b/test/outputs/data-uri-highlight.png
index 69e4a07..11e0296 100644
Binary files a/test/outputs/data-uri-highlight.png and b/test/outputs/data-uri-highlight.png differ
diff --git a/test/outputs/diff-highlight.html b/test/outputs/diff-highlight.html
index 7876e1a..24c8741 100644
--- a/test/outputs/diff-highlight.html
+++ b/test/outputs/diff-highlight.html
@@ -2,7 +2,7 @@
 
@@ -4,6 +4,5 @@
+  >@@ -4,6 +4,5 @@
 -  let foo = bar.baz([1, 2, 3]);
 -  foo = foo + 1;
 +  const foo = bar.baz([1, 2, 3]) + 1;
@@ -12,7 +12,7 @@
 
@@ -4,6 +4,5 @@
+  >@@ -4,6 +4,5 @@
 -  let foo = bar.baz([1, 2, 3]);
 -  foo = foo + 1;
 +  const foo = bar.baz([1, 2, 3]) + 1;
@@ -22,7 +22,7 @@
 
@@ -4,6 +4,5 @@
+  >@@ -4,6 +4,5 @@
 -  let foo = bar.baz([1, 2, 3]);
 -  foo = foo + 1;
 +  const foo = bar.baz([1, 2, 3]) + 1;
diff --git a/test/outputs/diff-highlight.png b/test/outputs/diff-highlight.png
index aafe7ce..4bf581f 100644
Binary files a/test/outputs/diff-highlight.png and b/test/outputs/diff-highlight.png differ
diff --git a/test/outputs/inline-color.html b/test/outputs/inline-color.html
index 278b231..66e66be 100644
--- a/test/outputs/inline-color.html
+++ b/test/outputs/inline-color.html
@@ -2,7 +2,7 @@
 
span.foo {
+  >span.foo {
   background-color: navy;
   color: #bfd;
 }
@@ -17,7 +17,7 @@
 
<!DOCTYPE html>
+  ><!DOCTYPE html>
 <html lang="en">
   <head>
     <meta charset="utf-8" />
diff --git a/test/outputs/inline-color.png b/test/outputs/inline-color.png
index 00122b5..6d80ff4 100644
Binary files a/test/outputs/inline-color.png and b/test/outputs/inline-color.png differ
diff --git a/test/outputs/keep-markup.html b/test/outputs/keep-markup.html
index 0eaceb3..42417d3 100644
--- a/test/outputs/keep-markup.html
+++ b/test/outputs/keep-markup.html
@@ -2,6 +2,6 @@
 
x<span>a</span>y
+  >x<span>a</span>y
 
diff --git a/test/outputs/keep-markup.png b/test/outputs/keep-markup.png index 62e2936..2ffedcd 100644 Binary files a/test/outputs/keep-markup.png and b/test/outputs/keep-markup.png differ diff --git a/test/outputs/languages.html b/test/outputs/languages.html index ed7834f..5678afa 100644 --- a/test/outputs/languages.html +++ b/test/outputs/languages.html @@ -2,7 +2,7 @@
<!DOCTYPE html>
+  ><!DOCTYPE html>
 <html lang="en">
   <head>
     <meta charset="UTF-8" />
@@ -18,14 +18,14 @@
 
<?xml version="1.0" encoding="UTF-8"?>
+  ><?xml version="1.0" encoding="UTF-8"?>
 <text><![CDATA[Hello World]]></text>
 
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="240" height="100" viewBox="0 0 240 100" zoomAndPan="disable">
+  ><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="240" height="100" viewBox="0 0 240 100" zoomAndPan="disable">
   <title>Hello World</title>
     <g>
       <text x="10" y="50">Hello World</text>
@@ -37,7 +37,7 @@
 
body::before {
+  >body::before {
   content: 'Hello World';
 }
 
@@ -45,13 +45,13 @@
console.log('Hello World');
+  >console.log('Hello World');
 
class HelloMessage extends React.Component {
+  >class HelloMessage extends React.Component {
   render() {
     return <div>Hello {this.props.name}</div>;
   }
@@ -66,7 +66,7 @@
 
REPORT ZHELLO_WORLD.
+  >REPORT ZHELLO_WORLD.
 
 START-OF-SELECTION.
     WRITE: 'Hello World'.
@@ -75,7 +75,7 @@
 
package
+  >package
 {
 	import flash.display.Sprite;
 	import flash.text.TextField;
@@ -95,7 +95,7 @@
 
with Text_IO;
+  >with Text_IO;
 procedure Hello_World is
 	begin
 		Text_IO.Put_line("Hello World");
@@ -105,19 +105,19 @@
 
'Hello World'
+  >'Hello World'
 
display dialog "Hello World"
+  >display dialog "Hello World"
 
void setup() {
+  >void setup() {
   Serial.begin(9600);
   Serial.println("Hello World");
 }
@@ -130,19 +130,19 @@
 
MsgBox, Hello World
+  >MsgBox, Hello World
 
MsgBox(0, "Message Box", "Hello World")
+  >MsgBox(0, "Message Box", "Hello World")
 
#!/bin/bash
+  >#!/bin/bash
 
 echo Hello World
 
@@ -150,34 +150,34 @@
#!/bin/sh
+  >#!/bin/sh
 echo "Hello World"
 
10 PRINT "Hello World"
+  >10 PRINT "Hello World"
 20 END
 
@echo off
+  >@echo off
 echo Hello World
 
-[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------.
+  >-[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------.
 
#include <stdio.h>
+  >#include <stdio.h>
 
 int main() {
 	printf("Hello World\n");
@@ -188,7 +188,7 @@
 
class HelloWorld {
+  >class HelloWorld {
 	static void Main() {
 		System.Console.WriteLine("Hello World");
 	}
@@ -198,7 +198,7 @@
 
#include <iostream>
+  >#include <iostream>
 
 using namespace std;
 
@@ -211,7 +211,7 @@
 
// ilasm cil.il
+  >// ilasm cil.il
 .assembly HelloWorld {}
 .method public static void Main() cil managed
 {
@@ -226,25 +226,25 @@
 
alert "Hello World"
+  >alert "Hello World"
 
(println "Hello World")
+  >(println "Hello World")
 
puts "Hello World"
+  >puts "Hello World"
 
// Hello World in D
+  >// Hello World in D
 import std.stdio;
 
 void main()
@@ -256,7 +256,7 @@
 
main() {
+  >main() {
   print('Hello World');
 }
 
@@ -264,7 +264,7 @@
indexing "Hello World in Eiffel , from http://roesler-ac.de/wolfram/hello.htm#Eiffel"
+  >indexing "Hello World in Eiffel , from http://roesler-ac.de/wolfram/hello.htm#Eiffel"
 
 class HELLO
 
@@ -287,13 +287,13 @@
 
 IO.puts "Defining the function world"
+  > IO.puts "Defining the function world"
 
import Html exposing (text)
+  >import Html exposing (text)
 
 main =
   text "Hello World"
@@ -302,7 +302,7 @@
 
-module(erlang_hw).
+  >-module(erlang_hw).
 -export([start/0]).
 
 start() ->
@@ -312,20 +312,20 @@
 
printfn "Hello World"
+  >printfn "Hello World"
 
USING: io ;
+  >USING: io ;
 "Hello World" print
 
program helloworld
+  >program helloworld
 print *,'Hello World'
 end program helloworld
 
@@ -333,7 +333,7 @@
extends Label
+  >extends Label
 
 func _ready():
   self.text = "Hello World"
@@ -342,11 +342,13 @@
 
draw_text(1, 1, "Hello World");
+  >draw_text(1, 1, "Hello World");
 
-
package main
+  
package main
 
 import "fmt"
 
@@ -356,7 +358,9 @@
 
-
{
+  
{
     "Hello World"
 }
 
@@ -364,11 +368,13 @@
println "Hello World"
+  >println "Hello World"
 
-
%html
+  
%html
   %title Hello World
   %body
     %h1 Hello World
@@ -377,7 +383,7 @@
 
module Main where
+  >module Main where
 
 main = putStrLn "Hello World"
 
@@ -385,7 +391,7 @@
class HelloWorld {
+  >class HelloWorld {
     static function main() {
         trace("Hello World");
     }
@@ -395,7 +401,7 @@
 
procedure main()
+  >procedure main()
     write("Hello World");
 end
 
@@ -403,13 +409,13 @@
"Hello World\n" print
+  >"Hello World\n" print
 
#!/opt/local/bin/jc
+  >#!/opt/local/bin/jc
 echo 'Hello World'
 exit ''
 
@@ -417,7 +423,7 @@
public class Java {
+  >public class Java {
 	public static void main(String[] args) {
 		System.out.println("Hello World");
 	}
@@ -427,19 +433,19 @@
 
{ "hello": "world" }
+  >{ "hello": "world" }
 
println("Hello World")
+  >println("Hello World")
 
package hello
+  >package hello
 
 fun main() {
   println("Hello World")
@@ -449,7 +455,7 @@
 
\documentclass{article}
+  >\documentclass{article}
 \begin{document}
 Hello World
 \end{document}
@@ -458,13 +464,15 @@
 
body::before {
+  >body::before {
   content: 'Hello World!';
 }
 
-
; LISP
+  
; LISP
 (DEFUN hello ()
   (PRINT (LIST 'HELLO 'WORLD))
 )
@@ -475,7 +483,7 @@
 
;;for emacs elisp
+  >;;for emacs elisp
 
 (message "hello,world")
 
@@ -483,13 +491,13 @@
console.log "Hello World"
+  >console.log "Hello World"
 
; llvm-as llvm.ll
+  >; llvm-as llvm.ll
 ; x86 assembly: llc llvm.bc -o llvm.s -march x86
 ; interpreter: lli llvm.bc
 
@@ -506,7 +514,9 @@
 
-
HAI
+  
HAI
 CAN HAS STDIO?
 VISIBLE "Hello World"
 KTHXBYE
@@ -515,25 +525,25 @@
 
print("Hello World")
+  >print("Hello World")
 
# Hello World
+  ># Hello World
 
disp('Hello World')
+  >disp('Hello World')
 
proc helloWorld () {
+  >proc helloWorld () {
    print "Hello World\n";
 }
 helloWorld;
@@ -542,13 +552,13 @@
 
print 'Hello World'
+  >print 'Hello World'
 
section	.text
+  >section	.text
     global _start			;must be declared for linker (ld)
 
 _start:					;tell linker entry point
@@ -573,11 +583,13 @@
 
echo("Hello World")
+  >echo("Hello World")
 
-
/*
+  
/*
  Build on OS X:
  clang -framework Foundation -fobjc-arc objc.m -o objc
 
@@ -596,19 +608,19 @@
 
print_string "Hello World\n"
+  >print_string "Hello World\n"
 
{Show 'Hello World'}
+  >{Show 'Hello World'}
 
@main[]
+  >@main[]
   ^rem{Will print "Hello World" when run as CGI script}
   $hello[Hello World]
   $result[$hello]
@@ -617,7 +629,7 @@
 
program HelloWorld(output);
+  >program HelloWorld(output);
 begin
         writeln('Hello World');
 end.
@@ -626,7 +638,7 @@
 
program ObjectPascalExample;
+  >program ObjectPascalExample;
 
 type
    THelloWorld = class
@@ -651,7 +663,7 @@
 
   #!/usr/local/bin/perl -w
+  >   #!/usr/local/bin/perl -w
    use CGI;                             # load CGI routines
    $q = CGI->new;                        # create new CGI object
    print $q->header,                    # create the HTTP header
@@ -665,13 +677,15 @@
 
<?php
+  ><?php
 
 echo 'Hello World';
 
-
begin
+  
begin
   dbms_output.put_line('Hello World');
 end;
 /
@@ -680,13 +694,13 @@
 
'Hello World'
+  >'Hello World'
 
size(128, 128);
+  >size(128, 128);
 background(0);
 textAlign(CENTER, CENTER);
 fill(255);
@@ -696,7 +710,7 @@
 
helloWorld :-
+  >helloWorld :-
   write('Hello World').
 
 :- helloWorld.
@@ -705,7 +719,7 @@
 
doctype html
+  >doctype html
 html
     head
        title Hello World
@@ -714,7 +728,7 @@
 
-
module Main where
+  
module Main where
 
 import Debug.Trace
 
@@ -724,7 +738,7 @@
 
If OpenConsole()
+  >If OpenConsole()
   PrintN("Hello World")
 EndIf
 
@@ -732,18 +746,20 @@
#!/usr/bin/env python
+  >#!/usr/bin/env python
 print "Hello World"
 
-
"Hello World"
+  
"Hello World"
 
#!/usr/bin/env qore
+  >#!/usr/bin/env qore
 %exec-class HelloWorld
 class HelloWorld
 {
@@ -761,33 +777,33 @@
 
cat("Hello World\n")
+  >cat("Hello World\n")
 
#lang racket
+  >#lang racket
 "Hello World"
 
print_string "Hello World"
+  >print_string "Hello World"
 
#!/usr/bin/env ruby
+  >#!/usr/bin/env ruby
 puts "Hello World"
 
fn main() {
+  >fn main() {
     println!("Hello World");
 }
 
@@ -795,7 +811,7 @@
%macro putit( string= );
+  >%macro putit( string= );
      %put &string;
      %mend;
 
@@ -805,14 +821,14 @@
 
body::before
+  >body::before
 	content: "Hello World"
 
object HelloWorld extends App {
+  >object HelloWorld extends App {
   println("Hello World")
 }
 
@@ -820,26 +836,26 @@
(display "Hello World") (newline)
+  >(display "Hello World") (newline)
 
#!/bin/sh
+  >#!/bin/sh
 echo "Hello World"
 
Transcript show: 'Hello World'.
+  >Transcript show: 'Hello World'.
 
pragma solidity ^0.6.4;
+  >pragma solidity ^0.6.4;
 
 contract HelloWorld {
     function render () public pure returns (string memory) {
@@ -851,7 +867,7 @@
 
SELECT ?h WHERE {
+  >SELECT ?h WHERE {
   VALUES ?h { "Hello World" }
 }
 
@@ -859,38 +875,38 @@
SELECT 'Hello World';
+  >SELECT 'Hello World';
 
body::before
+  >body::before
 	content: "Hello World"
 
print("Hello World")
+  >print("Hello World")
 
puts "Hello World"
+  >puts "Hello World"
 
console.log('Hello World');
+  >console.log('Hello World');
 
static void main (string[] args)
+  >static void main (string[] args)
 {
 	stdout.printf ("Hello World\n");
 }
@@ -900,7 +916,7 @@
 
Module HelloWorld
+  >Module HelloWorld
     Sub Main()
         System.Console.WriteLine("Hello World")
     End Sub
@@ -910,7 +926,7 @@
 
module main;
+  >module main;
   initial
     begin
       $display("Hello World");
@@ -922,7 +938,7 @@
 
use std.textio.all;
+  >use std.textio.all;
 
 entity hello_world is
 end hello_world;
@@ -940,11 +956,13 @@
 
echo "Hello World"
+  >echo "Hello World"
 
-
Module HelloWorld
+  
Module HelloWorld
     Sub Main()
         MsgBox("Hello World")
     End Sub
@@ -952,19 +970,19 @@
 
-
Hello World
+  
Hello World
 
let $hello := "Hello World"
+  >let $hello := "Hello World"
 return $hello
 
hello: world
+  >hello: world
 
diff --git a/test/outputs/languages.png b/test/outputs/languages.png index 40481a2..b079568 100644 Binary files a/test/outputs/languages.png and b/test/outputs/languages.png differ diff --git a/test/outputs/legend.html b/test/outputs/legend.html index 03d39c2..7069e30 100644 --- a/test/outputs/legend.html +++ b/test/outputs/legend.html @@ -2,7 +2,7 @@
<!DOCTYPE html>
+  ><!DOCTYPE html>
 <html lang="en">
   <head>
     <meta charset="UTF-8" />
diff --git a/test/outputs/legend.png b/test/outputs/legend.png
index af90b06..f81c62a 100644
Binary files a/test/outputs/legend.png and b/test/outputs/legend.png differ
diff --git a/test/outputs/line-highlight.html b/test/outputs/line-highlight.html
index 7aa3f2f..b013d61 100644
--- a/test/outputs/line-highlight.html
+++ b/test/outputs/line-highlight.html
@@ -2,7 +2,7 @@
 
<!DOCTYPE html>
+  ><!DOCTYPE html>
 <html lang="en">
   <head>
     <meta charset="UTF-8" />
@@ -18,7 +18,7 @@
 
<!DOCTYPE html>
+  ><!DOCTYPE html>
 <html lang="en">
   <head>
     <meta charset="UTF-8" />
diff --git a/test/outputs/line-highlight.png b/test/outputs/line-highlight.png
index 5d1a553..7ce7480 100644
Binary files a/test/outputs/line-highlight.png and b/test/outputs/line-highlight.png differ
diff --git a/test/outputs/line-numbers.html b/test/outputs/line-numbers.html
index d1af999..1b259e5 100644
--- a/test/outputs/line-numbers.html
+++ b/test/outputs/line-numbers.html
@@ -2,7 +2,7 @@
 
<!DOCTYPE html>
+  ><!DOCTYPE html>
 <html lang="en">
   <head>
     <meta charset="UTF-8" />
@@ -18,7 +18,7 @@
 
<!DOCTYPE html>
+  ><!DOCTYPE html>
 <html lang="en">
   <head>
     <meta charset="UTF-8" />
@@ -34,7 +34,7 @@
 
<!DOCTYPE html>
+  ><!DOCTYPE html>
 <html lang="en">
   <head>
     <meta charset="UTF-8" />
diff --git a/test/outputs/no-lang.html b/test/outputs/no-lang.html
index bc62e60..f9aba22 100644
--- a/test/outputs/no-lang.html
+++ b/test/outputs/no-lang.html
@@ -1,6 +1,6 @@
 
 
-
hello
+  
hello
 world
 
diff --git a/test/outputs/no-lang.png b/test/outputs/no-lang.png index f440348..8b18f85 100644 Binary files a/test/outputs/no-lang.png and b/test/outputs/no-lang.png differ diff --git a/test/outputs/show-invisibles.html b/test/outputs/show-invisibles.html index d80a348..66d907b 100644 --- a/test/outputs/show-invisibles.html +++ b/test/outputs/show-invisibles.html @@ -2,7 +2,7 @@
<!DOCTYPE html>
+  ><!DOCTYPE html>
 <html lang="en">
   <head>
     <meta charset="UTF-8" />
diff --git a/test/outputs/show-invisibles.png b/test/outputs/show-invisibles.png
index 4d2945f..5b15983 100644
Binary files a/test/outputs/show-invisibles.png and b/test/outputs/show-invisibles.png differ
diff --git a/test/outputs/show-numbers.png b/test/outputs/show-numbers.png
index c87fe54..4d10699 100644
Binary files a/test/outputs/show-numbers.png and b/test/outputs/show-numbers.png differ
diff --git a/test/outputs/treeview.html b/test/outputs/treeview.html
index b9f2422..b1f2bf6 100644
--- a/test/outputs/treeview.html
+++ b/test/outputs/treeview.html
@@ -2,7 +2,7 @@
 
.
+  >.
 ├── .eslintignore
 ├── .eslintrc
 ├── .gitignore
diff --git a/test/outputs/treeview.png b/test/outputs/treeview.png
index 94c05ea..e220c37 100644
Binary files a/test/outputs/treeview.png and b/test/outputs/treeview.png differ
diff --git a/test/snapshots/index.js.md b/test/snapshots/index.js.md
index 5410fb7..dc7ec1f 100644
--- a/test/snapshots/index.js.md
+++ b/test/snapshots/index.js.md
@@ -10,7 +10,9 @@ Generated by [AVA](https://avajs.dev).
 
     `
␊ -
/**␊
+      /**␊
      * Prism: Lightweight, robust, elegant syntax highlighting␊
      * MIT license http://www.opensource.org/licenses/mit-license.php/␊
      * @author Lea Verou http://lea.verou.me␊
@@ -24,7 +26,7 @@ Generated by [AVA](https://avajs.dev).
     
@font-face {␊ + >@font-face {src: url(http://lea.verou.me/logo.otf);font-family: 'LeaVerou';}␊ @@ -33,7 +35,7 @@ Generated by [AVA](https://avajs.dev).
<!-- Links in HTML, woo!␊ + ><!-- Links in HTML, woo!␊ Lea Verou http://lea.verou.me or, with Markdown, Lea Verou --><img src="http://prismjs.com/img/spectrum.png" alt="In attributes too!" /><p>Autolinking in raw text: http://prismjs.com</p>␊ @@ -42,7 +44,7 @@ Generated by [AVA](https://avajs.dev).
[Text you want to see](http://url-goes-here.com)␊ + >[Text you want to see](http://url-goes-here.com)
␊ ` @@ -58,7 +60,7 @@ Generated by [AVA](https://avajs.dev). data-host="remotehost"␊ data-output="2,4-8"␊ class="language-bash"␊ - >pwd␊ + >pwd␊ /usr/home/chris/bin␊ ls -la␊ total 2␊ @@ -78,7 +80,7 @@ Generated by [AVA](https://avajs.dev).
div {␊ + >div {border: 40px solid transparent;border-image: 33.334%padding: 1em;␊ @@ -98,7 +100,7 @@ Generated by [AVA](https://avajs.dev).
@@ -4,6 +4,5 @@␊ + >@@ -4,6 +4,5 @@- let foo = bar.baz([1, 2, 3]);␊ - foo = foo + 1;␊ + const foo = bar.baz([1, 2, 3]) + 1;␊ @@ -108,7 +110,7 @@ Generated by [AVA](https://avajs.dev).
@@ -4,6 +4,5 @@␊ + >@@ -4,6 +4,5 @@- let foo = bar.baz([1, 2, 3]);␊ - foo = foo + 1;␊ + const foo = bar.baz([1, 2, 3]) + 1;␊ @@ -118,7 +120,7 @@ Generated by [AVA](https://avajs.dev).
@@ -4,6 +4,5 @@␊ + >@@ -4,6 +4,5 @@- let foo = bar.baz([1, 2, 3]);- foo = foo + 1;+ const foo = bar.baz([1, 2, 3]) + 1;␊ @@ -135,7 +137,7 @@ Generated by [AVA](https://avajs.dev).
span.foo {␊ + >span.foo {background-color: navy;color: #bfd;}␊ @@ -150,7 +152,7 @@ Generated by [AVA](https://avajs.dev).
<!DOCTYPE html>␊ + ><!DOCTYPE html><html lang="en"><head><meta charset="utf-8" />␊ @@ -175,7 +177,7 @@ Generated by [AVA](https://avajs.dev).
x<span>a</span>y␊ + >x<span>a</span>y␊
␊ ` @@ -188,7 +190,7 @@ Generated by [AVA](https://avajs.dev).
<!DOCTYPE html>␊ + ><!DOCTYPE html><html lang="en"><head><meta charset="UTF-8" />␊ @@ -204,14 +206,14 @@ Generated by [AVA](https://avajs.dev).
<?xml version="1.0" encoding="UTF-8"?>␊ + ><?xml version="1.0" encoding="UTF-8"?><text><![CDATA[Hello World]]></text>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="240" height="100" viewBox="0 0 240 100" zoomAndPan="disable">␊ + ><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="240" height="100" viewBox="0 0 240 100" zoomAndPan="disable"><title>Hello World</title><g><text x="10" y="50">Hello World</text>␊ @@ -223,7 +225,7 @@ Generated by [AVA](https://avajs.dev).
body::before {␊ + >body::before {content: 'Hello World';}
␊ @@ -231,13 +233,13 @@ Generated by [AVA](https://avajs.dev).
console.log('Hello World');␊ + >console.log('Hello World');
class HelloMessage extends React.Component {␊ + >class HelloMessage extends React.Component {render() {return <div>Hello {this.props.name}</div>;}␊ @@ -252,7 +254,7 @@ Generated by [AVA](https://avajs.dev).
REPORT ZHELLO_WORLD.␊ + >REPORT ZHELLO_WORLD.␊ ␊ START-OF-SELECTION.WRITE: 'Hello World'.␊ @@ -261,7 +263,7 @@ Generated by [AVA](https://avajs.dev).
package␊ + >package{import flash.display.Sprite;import flash.text.TextField;␊ @@ -281,7 +283,7 @@ Generated by [AVA](https://avajs.dev).
with Text_IO;␊ + >with Text_IO;procedure Hello_World isbeginText_IO.Put_line("Hello World");␊ @@ -291,19 +293,19 @@ Generated by [AVA](https://avajs.dev).
'Hello World'␊ + >'Hello World'
display dialog "Hello World"␊ + >display dialog "Hello World"
void setup() {␊ + >void setup() {Serial.begin(9600);Serial.println("Hello World");}␊ @@ -316,19 +318,19 @@ Generated by [AVA](https://avajs.dev).
MsgBox, Hello World␊ + >MsgBox, Hello World␊
MsgBox(0, "Message Box", "Hello World")␊ + >MsgBox(0, "Message Box", "Hello World")
#!/bin/bash␊ + >#!/bin/bash␊ ␊ echo Hello World␊
␊ @@ -336,34 +338,34 @@ Generated by [AVA](https://avajs.dev).
#!/bin/sh␊ + >#!/bin/shecho "Hello World"
10 PRINT "Hello World"␊ + >10 PRINT "Hello World"20 END
@echo off␊ + >@echo offecho Hello World
-[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------.␊ + >-[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------.
#include <stdio.h>␊ + >#include <stdio.h>␊ ␊ int main() {printf("Hello World\\n");␊ @@ -374,7 +376,7 @@ Generated by [AVA](https://avajs.dev).
class HelloWorld {␊ + >class HelloWorld {static void Main() {␊ System.Console.WriteLine("Hello World");}␊ @@ -384,7 +386,7 @@ Generated by [AVA](https://avajs.dev).
#include <iostream>␊ + >#include <iostream>␊ ␊ using namespace std;␊ ␊ @@ -397,7 +399,7 @@ Generated by [AVA](https://avajs.dev).
// ilasm cil.il␊ + >// ilasm cil.il.assembly HelloWorld {}.method public static void Main() cil managed{␊ @@ -412,25 +414,25 @@ Generated by [AVA](https://avajs.dev).
alert "Hello World"␊ + >alert "Hello World"
(println "Hello World")␊ + >(println "Hello World")
puts "Hello World"␊ + >puts "Hello World"
// Hello World in D␊ + >// Hello World in Dimport std.stdio;␊ ␊ void main()␊ @@ -442,7 +444,7 @@ Generated by [AVA](https://avajs.dev).
main() {␊ + >main() {print('Hello World');}
␊ @@ -450,7 +452,7 @@ Generated by [AVA](https://avajs.dev).
indexing "Hello World in Eiffel , from http://roesler-ac.de/wolfram/hello.htm#Eiffel"␊ + >indexing "Hello World in Eiffel , from http://roesler-ac.de/wolfram/hello.htm#Eiffel"␊ ␊ class HELLO␊ ␊ @@ -473,13 +475,13 @@ Generated by [AVA](https://avajs.dev).
IO.puts "Defining the function world"␊ + > IO.puts "Defining the function world"
import Html exposing (text)␊ + >import Html exposing (text)␊ ␊ main =text "Hello World"␊ @@ -488,7 +490,7 @@ Generated by [AVA](https://avajs.dev).
-module(erlang_hw).␊ + >-module(erlang_hw).-export([start/0]).␊ ␊ start() ->␊ @@ -498,20 +500,20 @@ Generated by [AVA](https://avajs.dev).
printfn "Hello World"␊ + >printfn "Hello World"
USING: io ;␊ + >USING: io ;"Hello World" print
program helloworld␊ + >program helloworld␊ print *,'Hello World'end program helloworld␊
␊ @@ -519,7 +521,7 @@ Generated by [AVA](https://avajs.dev).
extends Label␊ + >extends Label␊ ␊ func _ready():self.text = "Hello World"␊ @@ -528,11 +530,13 @@ Generated by [AVA](https://avajs.dev).
draw_text(1, 1, "Hello World");␊ + >draw_text(1, 1, "Hello World");
␊ -
package main␊
+      package main␊
     ␊
     import "fmt"␊
     ␊
@@ -542,7 +546,9 @@ Generated by [AVA](https://avajs.dev).
     
␊ -
{␊
+      {"Hello World"}
␊ @@ -550,11 +556,13 @@ Generated by [AVA](https://avajs.dev).
println "Hello World"␊ + >println "Hello World"
␊ -
%html␊
+      %html%title Hello World␊
       %body%h1 Hello World␊
@@ -563,7 +571,7 @@ Generated by [AVA](https://avajs.dev).
     
module Main where␊ + >module Main where␊ ␊ main = putStrLn "Hello World"
␊ @@ -571,7 +579,7 @@ Generated by [AVA](https://avajs.dev).
class HelloWorld {␊ + >class HelloWorld {static function main() {trace("Hello World");}␊ @@ -581,7 +589,7 @@ Generated by [AVA](https://avajs.dev).
procedure main()␊ + >procedure main()write("Hello World");end
␊ @@ -589,13 +597,13 @@ Generated by [AVA](https://avajs.dev).
"Hello World\\n" print␊ + >"Hello World\\n" print
#!/opt/local/bin/jc␊ + >#!/opt/local/bin/jc␊ echo 'Hello World'␊ exit ''
␊ @@ -603,7 +611,7 @@ Generated by [AVA](https://avajs.dev).
public class Java {␊ + >public class Java {public static void main(String[] args) {System.out.println("Hello World");}␊ @@ -613,19 +621,19 @@ Generated by [AVA](https://avajs.dev).
{ "hello": "world" }␊ + >{ "hello": "world" }
println("Hello World")␊ + >println("Hello World")
package hello␊ + >package hello␊ ␊ fun main() {println("Hello World")␊ @@ -635,7 +643,7 @@ Generated by [AVA](https://avajs.dev).
\\documentclass{article}␊ + >\\documentclass{article}\\begin{document}␊ Hello World␊ \\end{document}␊ @@ -644,13 +652,15 @@ Generated by [AVA](https://avajs.dev).
body::before {␊ + >body::before {content: 'Hello World!';}
␊ -
; LISP␊
+      ; LISP(DEFUN hello ()(PRINT (LIST 'HELLO 'WORLD)))␊
@@ -661,7 +671,7 @@ Generated by [AVA](https://avajs.dev).
     
;;for emacs elisp␊ + >;;for emacs elisp␊ ␊ (message "hello,world")
␊ @@ -669,13 +679,13 @@ Generated by [AVA](https://avajs.dev).
console.log "Hello World"␊ + >console.log "Hello World"
; llvm-as llvm.ll␊ + >; llvm-as llvm.ll; x86 assembly: llc llvm.bc -o llvm.s -march x86; interpreter: lli llvm.bc␊ ␊ @@ -692,7 +702,9 @@ Generated by [AVA](https://avajs.dev).
␊ -
HAI␊
+      HAI␊
     CAN HAS STDIO?␊
     VISIBLE "Hello World"KTHXBYE␊
@@ -701,25 +713,25 @@ Generated by [AVA](https://avajs.dev).
     
print("Hello World")␊ + >print("Hello World")
# Hello World␊ + ># Hello World
disp('Hello World')␊ + >disp('Hello World')
proc helloWorld () {␊ + >proc helloWorld () {print "Hello World\\n";}␊ helloWorld;␊ @@ -728,13 +740,13 @@ Generated by [AVA](https://avajs.dev).
print 'Hello World'␊ + >print 'Hello World'
section .text␊ + >section .textglobal _start ;must be declared for linker (ld)␊ ␊ _start: ;tell linker entry point␊ @@ -759,11 +771,13 @@ Generated by [AVA](https://avajs.dev).
echo("Hello World")␊ + >echo("Hello World")
␊ -
/*␊
+      /*␊
      Build on OS X:␊
      clang -framework Foundation -fobjc-arc objc.m -o objc␊
     ␊
@@ -782,19 +796,19 @@ Generated by [AVA](https://avajs.dev).
     
print_string "Hello World\\n"␊ + >print_string "Hello World\\n"
{Show 'Hello World'}␊ + >{Show 'Hello World'}
@main[]␊ + >@main[]^rem{Will print "Hello World" when run as CGI script}$hello[Hello World]$result[$hello]␊ @@ -803,7 +817,7 @@ Generated by [AVA](https://avajs.dev).
program HelloWorld(output);␊ + >program HelloWorld(output);begin␊ writeln('Hello World');end.␊ @@ -812,7 +826,7 @@ Generated by [AVA](https://avajs.dev).
program ObjectPascalExample;␊ + >program ObjectPascalExample;␊ ␊ type␊ THelloWorld = class␊ @@ -837,7 +851,7 @@ Generated by [AVA](https://avajs.dev).
#!/usr/local/bin/perl -w␊ + > #!/usr/local/bin/perl -wuse CGI; # load CGI routines$q = CGI->new; # create new CGI objectprint $q->header, # create the HTTP header␊ @@ -851,13 +865,15 @@ Generated by [AVA](https://avajs.dev).
<?php␊ + ><?php␊ ␊ echo 'Hello World';
␊ -
begin␊
+      begin␊
       dbms_output.put_line('Hello World');end;/␊
@@ -866,13 +882,13 @@ Generated by [AVA](https://avajs.dev).
     
'Hello World'␊ + >'Hello World'
size(128, 128);␊ + >size(128, 128);background(0);textAlign(CENTER, CENTER);fill(255);␊ @@ -882,7 +898,7 @@ Generated by [AVA](https://avajs.dev).
helloWorld :-␊ + >helloWorld :-write('Hello World').␊ ␊ :- helloWorld.␊ @@ -891,7 +907,7 @@ Generated by [AVA](https://avajs.dev).
doctype html␊ + >doctype htmlhtmlheadtitle Hello World␊ @@ -900,7 +916,7 @@ Generated by [AVA](https://avajs.dev).
␊ -
module Main where␊
+      
module Main where␊
     ␊
     import Debug.Trace␊
     ␊
@@ -910,7 +926,7 @@ Generated by [AVA](https://avajs.dev).
     
If OpenConsole()␊ + >If OpenConsole()PrintN("Hello World")EndIf
␊ @@ -918,18 +934,20 @@ Generated by [AVA](https://avajs.dev).
#!/usr/bin/env python␊ + >#!/usr/bin/env pythonprint "Hello World"
␊ -
"Hello World"␊
+      "Hello World"
#!/usr/bin/env qore␊ + >#!/usr/bin/env qore%exec-class HelloWorldclass HelloWorld{␊ @@ -947,33 +965,33 @@ Generated by [AVA](https://avajs.dev).
cat("Hello World\\n")␊ + >cat("Hello World\\n")
#lang racket␊ + >#lang racket"Hello World"
print_string "Hello World"␊ + >print_string "Hello World"
#!/usr/bin/env ruby␊ + >#!/usr/bin/env ruby␊ puts "Hello World"
fn main() {␊ + >fn main() {println!("Hello World");}
␊ @@ -981,7 +999,7 @@ Generated by [AVA](https://avajs.dev).
%macro putit( string= );␊ + >%macro putit( string= );%put &string;%mend;␊ ␊ @@ -991,14 +1009,14 @@ Generated by [AVA](https://avajs.dev).
body::before␊ + >body::before content: "Hello World"
object HelloWorld extends App {␊ + >object HelloWorld extends App {␊ println("Hello World")}
␊ @@ -1006,26 +1024,26 @@ Generated by [AVA](https://avajs.dev).
(display "Hello World") (newline)␊ + >(display "Hello World") (newline)
#!/bin/sh␊ + >#!/bin/shecho "Hello World"
Transcript show: 'Hello World'.␊ + >Transcript show: 'Hello World'.
pragma solidity ^0.6.4;␊ + >pragma solidity ^0.6.4;␊ ␊ contract HelloWorld {function render () public pure returns (string memory) {␊ @@ -1037,7 +1055,7 @@ Generated by [AVA](https://avajs.dev).
SELECT ?h WHERE {␊ + >SELECT ?h WHERE {VALUES ?h { "Hello World" }}
␊ @@ -1045,38 +1063,38 @@ Generated by [AVA](https://avajs.dev).
SELECT 'Hello World';␊ + >SELECT 'Hello World';
body::before␊ + >body::beforecontent: "Hello World"
print("Hello World")␊ + >print("Hello World")
puts "Hello World"␊ + >puts "Hello World"
console.log('Hello World');␊ + >console.log('Hello World');
static void main (string[] args)␊ + >static void main (string[] args){␊ stdout.printf ("Hello World\\n");}␊ @@ -1086,7 +1104,7 @@ Generated by [AVA](https://avajs.dev).
Module HelloWorld␊ + >Module HelloWorld␊ Sub Main()System.Console.WriteLine("Hello World")End Sub␊ @@ -1096,7 +1114,7 @@ Generated by [AVA](https://avajs.dev).
module main;␊ + >module main;initialbegin$display("Hello World");␊ @@ -1108,7 +1126,7 @@ Generated by [AVA](https://avajs.dev).
use std.textio.all;␊ + >use std.textio.all;␊ ␊ entity hello_world isend hello_world;␊ @@ -1126,11 +1144,13 @@ Generated by [AVA](https://avajs.dev).
echo "Hello World"␊ + >echo "Hello World"
␊ -
Module HelloWorld␊
+      Module HelloWorld␊
         Sub Main()␊
             MsgBox("Hello World")␊
         End Sub␊
@@ -1138,20 +1158,20 @@ Generated by [AVA](https://avajs.dev).
     
␊ -
Hello World␊
+      
Hello World␊
     
let $hello := "Hello World"␊ + >let $hello := "Hello World"return $hello
hello: world␊ + >hello: world␊
␊ ` @@ -1164,7 +1184,7 @@ Generated by [AVA](https://avajs.dev).
<!DOCTYPE html>␊ + ><!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" />␊ @@ -1188,7 +1208,7 @@ Generated by [AVA](https://avajs.dev).
<!DOCTYPE html>␊ + ><!DOCTYPE html><html lang="en"> <head><meta charset="UTF-8" />␊ @@ -1204,7 +1224,7 @@ Generated by [AVA](https://avajs.dev).
<!DOCTYPE html>␊ + ><!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" />␊ @@ -1227,7 +1247,7 @@ Generated by [AVA](https://avajs.dev).
<!DOCTYPE html>␊ + ><!DOCTYPE html><html lang="en"><head><meta charset="UTF-8" />␊ @@ -1243,7 +1263,7 @@ Generated by [AVA](https://avajs.dev).
<!DOCTYPE html>␊ + ><!DOCTYPE html><html lang="en"> <head><meta charset="UTF-8" />␊ @@ -1259,7 +1279,7 @@ Generated by [AVA](https://avajs.dev).
<!DOCTYPE html>␊ + ><!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" />␊ @@ -1280,7 +1300,7 @@ Generated by [AVA](https://avajs.dev). `
␊ -
hello␊
+      
hello␊
     world␊
     
␊ @@ -1294,7 +1314,7 @@ Generated by [AVA](https://avajs.dev).
<!DOCTYPE html>␊ + ><!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" />␊ @@ -1317,7 +1337,7 @@ Generated by [AVA](https://avajs.dev).
.␊ + >.├── .eslintignore├── .eslintrc├── .gitignore␊ diff --git a/test/snapshots/index.js.snap b/test/snapshots/index.js.snap index b75d053..28df390 100644 Binary files a/test/snapshots/index.js.snap and b/test/snapshots/index.js.snap differ