diff --git a/README.md b/README.md index 4f531b2..97c7dcc 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,27 @@ Output: Take a look at our [fixtures](test/fixtures) and it's [outputs](test/outputs) to see more examples. +### reusing highlighters + +To avoid initializing highlighter for every call: + +```js +const createHighlighter = require("remark-prism/src/highlight"); + +const highlighter = createHighlighter({}); + +require('unified')() + .use(require('remark-parse')) + .use(require('remark-prism'), { + highlighter: highlighter, + /* options */ + }) + .use(require('remark-rehype')) + .use(require('rehype-format')) + .use(require('rehype-stringify')) + .process(file, (err, file) => console.log(String(file))); +``` + ### `transformInlineCode` Add relevant class names to inline code snippets. For example when you use single backtick code examples. diff --git a/src/index.js b/src/index.js index b8671d6..b723933 100644 --- a/src/index.js +++ b/src/index.js @@ -71,7 +71,12 @@ const parseLang = (str) => { }; module.exports = (options = {}) => (tree) => { - const highlight = createHighlighter(options); + let { highlighter } = options; + + if (highlighter === undefined) { + highlighter = createHighlighter(options); + } + const { transformInlineCode = false } = options; return map(tree, (node) => { @@ -104,7 +109,7 @@ module.exports = (options = {}) => (tree) => { const code = h( 'code', { className: `language-${lang}` }, - highlight({ + highlighter({ lang, value: value || diff --git a/test/index.js b/test/index.js index 768ada5..a12e30f 100644 --- a/test/index.js +++ b/test/index.js @@ -15,6 +15,7 @@ const vfile = require('to-vfile'); const unified = require('unified'); const prism = require('..'); +const createHighlighter = require('../src/highlight'); const { PLUGINS } = require('../src/highlight'); const { CI = 'false' } = process.env; @@ -148,7 +149,15 @@ const compileHAst = async (testcase, options) => { }; const compileAll = async (name, options = {}) => { - const { mdast, hast, jsx } = await Parallel({ + const rawHighlighter = createHighlighter(options); + + let counter = 0; + const highlighter = (...args) => { + counter++; + return rawHighlighter(...args); + }; + + const { mdast, hast, jsx, mdastWithExisting, hastWithExisting, jsxWithExisting } = await Parallel({ mdast: async () => { const output = await compileMdAst(name, options); await writeFile(join(OUTPUTS, `${name}.mdast.html`), output); @@ -166,11 +175,34 @@ const compileAll = async (name, options = {}) => { const output = await compileJsx(src, options); await writeFile(join(OUTPUTS, `${name}.jsx.html`), output); + return output; + }, + mdastWithExisting: async () => { + const output = await compileMdAst(name, {...options, highlighter}); + await writeFile(join(OUTPUTS, `${name}.mdastWithExisting.html`), output); + + return output; + }, + hastWithExisting: async () => { + const output = await compileHAst(name, {...options, highlighter}); + await writeFile(join(OUTPUTS, `${name}.hastWithExisting.html`), output); + + return output; + }, + jsxWithExisting: async () => { + const src = await readFile(join(FIXTURES, `${name}.md`)); + const output = await compileJsx(src, {...options, highlighter}); + await writeFile(join(OUTPUTS, `${name}.jsxWithExisting.html`), output); + return output; }, }); - return [mdast, hast, jsx]; + if (counter < 2) { + throw new Error(`Existing highlighter only used ${counter} time(s)`); + } + + return [mdast, hast, jsx, mdastWithExisting, hastWithExisting, jsxWithExisting]; }; const fixtures = readdirSync(FIXTURES) @@ -179,7 +211,7 @@ const fixtures = readdirSync(FIXTURES) for (const name of fixtures) { test(name, async (t) => { - const [mdast, hast, jsx] = await compileAll(name, { + const [mdast, hast, jsx, mdastWithExisting, hastWithExisting, jsxWithExisting] = await compileAll(name, { plugins: [ ...(PLUGINS.includes(name) ? [name] @@ -200,8 +232,11 @@ for (const name of fixtures) { t.snapshot(mdast); t.snapshot(hast); t.snapshot(jsx); + t.snapshot(mdastWithExisting); + t.snapshot(hastWithExisting); + t.snapshot(jsxWithExisting); - await ForEach(['jsx', 'mdast', 'hast'], async (type) => { + await ForEach(['jsx', 'mdast', 'hast', 'jsxWithExisting', 'hastWithExisting', 'jsxWithExisting'], async (type) => { return takeScreenshot( join(OUTPUTS, `${name}.${type}.html`), join(OUTPUTS, `${name}.${type}.png`), diff --git a/test/outputs/all.hast.png b/test/outputs/all.hast.png index eb7b9b7..8f8fa23 100644 Binary files a/test/outputs/all.hast.png and b/test/outputs/all.hast.png differ diff --git a/test/outputs/all.hastWithExisting.html b/test/outputs/all.hastWithExisting.html new file mode 100644 index 0000000..24b4798 --- /dev/null +++ b/test/outputs/all.hastWithExisting.html @@ -0,0 +1,149 @@ + +

hello from remark-prism

+

welcome all.

+
+
[Text you want to see](http://url-goes-here.com)
+
+
+
+
pwd
+/usr/home/chris/bin
+ls -la
+total 2
+drwxr-xr-x   2 chris  chris     11 Jan 10 16:48 .
+drwxr--r-x  45 chris  chris     92 Feb 14 11:10 ..
+-rwxr-xr-x   1 chris  chris    444 Aug 25  2013 backup
+-rwxr-xr-x   1 chris  chris    642 Jan 17 14:42 deploy
+
+
+
+
div {
+  border: 40px solid transparent;
+  border-image: 33.334%
+  padding: 1em;
+  max-width: 20em;
+  font: 130%/1.6 Baskerville, Palatino, serif;
+  border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6   c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7   c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7   C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6   c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');
+}
+
+
+
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
+
+
span.foo {
+  background-color: navy;
+  color: #bfd;
+}
+
+span.bar {
+  background: rgba(105, 0, 12, 0.38);
+  color: hsl(30, 100%, 50%);
+  border-color: transparent;
+}
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+ file.html +
+
+
export default () => {
+  // register current used theme
+  const [theme, setTheme] = React.useState(themes.light);
+
+  // handle the radio changes
+  const handleChange = ({ target }) => {
+    // based on the radio value, toggle to the correct theme
+    return setTheme(themes[target.value]);
+  };
+
+  return (
+    <ThemeProvider value={theme}>
+      <Button>I am styled by theme context!</Button>
+      <form onChange={handleChange}>
+        <p>Please select your theme:</p>
+        <input type="radio" id="light" name="theme" value="light" />
+        <label for="light">Light</label>
+        <input type="radio" id="dark" name="theme" value="dark" />
+        <label for="dark">Dark</label>
+      </form>
+    </ThemeProvider>
+  );
+};
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
hello
+world
+
+
+
.
+├── .eslintignore
+├── .eslintrc
+├── .gitignore
+├── .prettierignore
+├── .prettierrc
+├── .yarnrc.yml
+├── README.md
+├── index.js
+├── package.json
+├── test
+├── fixtures
+└── index.js
+└── yarn.lock
+
+7 directories, 41 files
+
+
diff --git a/test/outputs/all.hastWithExisting.png b/test/outputs/all.hastWithExisting.png new file mode 100644 index 0000000..8f8fa23 Binary files /dev/null and b/test/outputs/all.hastWithExisting.png differ diff --git a/test/outputs/all.jsx.png b/test/outputs/all.jsx.png index 6ef6d21..3a4fbf0 100644 Binary files a/test/outputs/all.jsx.png and b/test/outputs/all.jsx.png differ diff --git a/test/outputs/all.jsxWithExisting.html b/test/outputs/all.jsxWithExisting.html new file mode 100644 index 0000000..d79345a --- /dev/null +++ b/test/outputs/all.jsxWithExisting.html @@ -0,0 +1,162 @@ +

hello from remark-prism

+

welcome all.

+
+
[Text you want to see](http://url-goes-here.com)
+
+
+
+
pwd
+/usr/home/chris/bin
+ls -la
+total 2
+drwxr-xr-x   2 chris  chris     11 Jan 10 16:48 .
+drwxr--r-x  45 chris  chris     92 Feb 14 11:10 ..
+-rwxr-xr-x   1 chris  chris    444 Aug 25  2013 backup
+-rwxr-xr-x   1 chris  chris    642 Jan 17 14:42 deploy
+
+
+
+
div {
+  border: 40px solid transparent;
+  border-image: 33.334%
+  padding: 1em;
+  max-width: 20em;
+  font: 130%/1.6 Baskerville, Palatino, serif;
+  border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6   c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7   c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7   C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6   c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');
+}
+
+
+
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
+
+
span.foo {
+  background-color: navy;
+  color: #bfd;
+}
+
+span.bar {
+  background: rgba(105, 0, 12, 0.38);
+  color: hsl(30, 100%, 50%);
+  border-color: transparent;
+}
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+ file.html +
+
+
export default () => {
+  // register current used theme
+  const [theme, setTheme] = React.useState(themes.light);
+
+  // handle the radio changes
+  const handleChange = ({ target }) => {
+    // based on the radio value, toggle to the correct theme
+    return setTheme(themes[target.value]);
+  };
+
+  return (
+    <ThemeProvider value={theme}>
+      <Button>I am styled by theme context!</Button>
+      <form onChange={handleChange}>
+        <p>Please select your theme:</p>
+        <input type="radio" id="light" name="theme" value="light" />
+        <label for="light">Light</label>
+        <input type="radio" id="dark" name="theme" value="dark" />
+        <label for="dark">Dark</label>
+      </form>
+    </ThemeProvider>
+  );
+};
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
hello
+world
+
+
+
.
+├── .eslintignore
+├── .eslintrc
+├── .gitignore
+├── .prettierignore
+├── .prettierrc
+├── .yarnrc.yml
+├── README.md
+├── index.js
+├── package.json
+├── test
+├── fixtures
+└── index.js
+└── yarn.lock
+
+7 directories, 41 files
+
+
diff --git a/test/outputs/all.jsxWithExisting.png b/test/outputs/all.jsxWithExisting.png new file mode 100644 index 0000000..3a4fbf0 Binary files /dev/null and b/test/outputs/all.jsxWithExisting.png differ diff --git a/test/outputs/all.mdast.png b/test/outputs/all.mdast.png index eb7b9b7..8f8fa23 100644 Binary files a/test/outputs/all.mdast.png and b/test/outputs/all.mdast.png differ diff --git a/test/outputs/all.mdastWithExisting.html b/test/outputs/all.mdastWithExisting.html new file mode 100644 index 0000000..24b4798 --- /dev/null +++ b/test/outputs/all.mdastWithExisting.html @@ -0,0 +1,149 @@ + +

hello from remark-prism

+

welcome all.

+
+
[Text you want to see](http://url-goes-here.com)
+
+
+
+
pwd
+/usr/home/chris/bin
+ls -la
+total 2
+drwxr-xr-x   2 chris  chris     11 Jan 10 16:48 .
+drwxr--r-x  45 chris  chris     92 Feb 14 11:10 ..
+-rwxr-xr-x   1 chris  chris    444 Aug 25  2013 backup
+-rwxr-xr-x   1 chris  chris    642 Jan 17 14:42 deploy
+
+
+
+
div {
+  border: 40px solid transparent;
+  border-image: 33.334%
+  padding: 1em;
+  max-width: 20em;
+  font: 130%/1.6 Baskerville, Palatino, serif;
+  border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6   c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7   c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7   C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6   c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');
+}
+
+
+
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
+
+
span.foo {
+  background-color: navy;
+  color: #bfd;
+}
+
+span.bar {
+  background: rgba(105, 0, 12, 0.38);
+  color: hsl(30, 100%, 50%);
+  border-color: transparent;
+}
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+ file.html +
+
+
export default () => {
+  // register current used theme
+  const [theme, setTheme] = React.useState(themes.light);
+
+  // handle the radio changes
+  const handleChange = ({ target }) => {
+    // based on the radio value, toggle to the correct theme
+    return setTheme(themes[target.value]);
+  };
+
+  return (
+    <ThemeProvider value={theme}>
+      <Button>I am styled by theme context!</Button>
+      <form onChange={handleChange}>
+        <p>Please select your theme:</p>
+        <input type="radio" id="light" name="theme" value="light" />
+        <label for="light">Light</label>
+        <input type="radio" id="dark" name="theme" value="dark" />
+        <label for="dark">Dark</label>
+      </form>
+    </ThemeProvider>
+  );
+};
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
hello
+world
+
+
+
.
+├── .eslintignore
+├── .eslintrc
+├── .gitignore
+├── .prettierignore
+├── .prettierrc
+├── .yarnrc.yml
+├── README.md
+├── index.js
+├── package.json
+├── test
+├── fixtures
+└── index.js
+└── yarn.lock
+
+7 directories, 41 files
+
+
diff --git a/test/outputs/autolinker.hast.png b/test/outputs/autolinker.hast.png index b6f2ed8..40e1ed5 100644 Binary files a/test/outputs/autolinker.hast.png and b/test/outputs/autolinker.hast.png differ diff --git a/test/outputs/autolinker.hastWithExisting.html b/test/outputs/autolinker.hastWithExisting.html new file mode 100644 index 0000000..1df8e4a --- /dev/null +++ b/test/outputs/autolinker.hastWithExisting.html @@ -0,0 +1,39 @@ + +
+
/**
+ * Prism: Lightweight, robust, elegant syntax highlighting
+ * MIT license http://www.opensource.org/licenses/mit-license.php/
+ * @author Lea Verou http://lea.verou.me
+ * Reach Lea at fake@email.com (no, not really)
+ * And this is a Markdown link. Sweet, huh?
+ */
+var foo = 5;
+// And a single line comment http://google.com
+
+
+
+
@font-face {
+  src: url(http://lea.verou.me/logo.otf);
+  font-family: 'LeaVerou';
+}
+
+
+
+
<!-- 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>
+
+
+
+
[Text you want to see](http://url-goes-here.com)
+
+
diff --git a/test/outputs/autolinker.hastWithExisting.png b/test/outputs/autolinker.hastWithExisting.png new file mode 100644 index 0000000..40e1ed5 Binary files /dev/null and b/test/outputs/autolinker.hastWithExisting.png differ diff --git a/test/outputs/autolinker.jsx.png b/test/outputs/autolinker.jsx.png index b6f2ed8..40e1ed5 100644 Binary files a/test/outputs/autolinker.jsx.png and b/test/outputs/autolinker.jsx.png differ diff --git a/test/outputs/autolinker.jsxWithExisting.html b/test/outputs/autolinker.jsxWithExisting.html new file mode 100644 index 0000000..db09c67 --- /dev/null +++ b/test/outputs/autolinker.jsxWithExisting.html @@ -0,0 +1,44 @@ +
+
/**
+ * Prism: Lightweight, robust, elegant syntax highlighting
+ * MIT license http://www.opensource.org/licenses/mit-license.php/
+ * @author Lea Verou http://lea.verou.me
+ * Reach Lea at fake@email.com (no, not really)
+ * And this is a Markdown link. Sweet, huh?
+ */
+var foo = 5;
+// And a single line comment http://google.com
+
+
+
+
@font-face {
+  src: url(http://lea.verou.me/logo.otf);
+  font-family: 'LeaVerou';
+}
+
+
+
+
<!-- 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>
+
+
+
+
[Text you want to see](http://url-goes-here.com)
+
+
diff --git a/test/outputs/autolinker.jsxWithExisting.png b/test/outputs/autolinker.jsxWithExisting.png new file mode 100644 index 0000000..40e1ed5 Binary files /dev/null and b/test/outputs/autolinker.jsxWithExisting.png differ diff --git a/test/outputs/autolinker.mdast.png b/test/outputs/autolinker.mdast.png index b6f2ed8..40e1ed5 100644 Binary files a/test/outputs/autolinker.mdast.png and b/test/outputs/autolinker.mdast.png differ diff --git a/test/outputs/autolinker.mdastWithExisting.html b/test/outputs/autolinker.mdastWithExisting.html new file mode 100644 index 0000000..1df8e4a --- /dev/null +++ b/test/outputs/autolinker.mdastWithExisting.html @@ -0,0 +1,39 @@ + +
+
/**
+ * Prism: Lightweight, robust, elegant syntax highlighting
+ * MIT license http://www.opensource.org/licenses/mit-license.php/
+ * @author Lea Verou http://lea.verou.me
+ * Reach Lea at fake@email.com (no, not really)
+ * And this is a Markdown link. Sweet, huh?
+ */
+var foo = 5;
+// And a single line comment http://google.com
+
+
+
+
@font-face {
+  src: url(http://lea.verou.me/logo.otf);
+  font-family: 'LeaVerou';
+}
+
+
+
+
<!-- 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>
+
+
+
+
[Text you want to see](http://url-goes-here.com)
+
+
diff --git a/test/outputs/command-line.hast.png b/test/outputs/command-line.hast.png index 7c683a4..84ee7db 100644 Binary files a/test/outputs/command-line.hast.png and b/test/outputs/command-line.hast.png differ diff --git a/test/outputs/command-line.hastWithExisting.html b/test/outputs/command-line.hastWithExisting.html new file mode 100644 index 0000000..25433cc --- /dev/null +++ b/test/outputs/command-line.hastWithExisting.html @@ -0,0 +1,17 @@ + +
+
pwd
+/usr/home/chris/bin
+ls -la
+total 2
+drwxr-xr-x   2 chris  chris     11 Jan 10 16:48 .
+drwxr--r-x  45 chris  chris     92 Feb 14 11:10 ..
+-rwxr-xr-x   1 chris  chris    444 Aug 25  2013 backup
+-rwxr-xr-x   1 chris  chris    642 Jan 17 14:42 deploy
+
+
diff --git a/test/outputs/command-line.hastWithExisting.png b/test/outputs/command-line.hastWithExisting.png new file mode 100644 index 0000000..84ee7db Binary files /dev/null and b/test/outputs/command-line.hastWithExisting.png differ diff --git a/test/outputs/command-line.jsx.png b/test/outputs/command-line.jsx.png index 7c683a4..84ee7db 100644 Binary files a/test/outputs/command-line.jsx.png and b/test/outputs/command-line.jsx.png differ diff --git a/test/outputs/command-line.jsxWithExisting.html b/test/outputs/command-line.jsxWithExisting.html new file mode 100644 index 0000000..85eaa72 --- /dev/null +++ b/test/outputs/command-line.jsxWithExisting.html @@ -0,0 +1,19 @@ +
+
pwd
+/usr/home/chris/bin
+ls -la
+total 2
+drwxr-xr-x   2 chris  chris     11 Jan 10 16:48 .
+drwxr--r-x  45 chris  chris     92 Feb 14 11:10 ..
+-rwxr-xr-x   1 chris  chris    444 Aug 25  2013 backup
+-rwxr-xr-x   1 chris  chris    642 Jan 17 14:42 deploy
+
+
diff --git a/test/outputs/command-line.jsxWithExisting.png b/test/outputs/command-line.jsxWithExisting.png new file mode 100644 index 0000000..84ee7db Binary files /dev/null and b/test/outputs/command-line.jsxWithExisting.png differ diff --git a/test/outputs/command-line.mdast.png b/test/outputs/command-line.mdast.png index 7c683a4..84ee7db 100644 Binary files a/test/outputs/command-line.mdast.png and b/test/outputs/command-line.mdast.png differ diff --git a/test/outputs/command-line.mdastWithExisting.html b/test/outputs/command-line.mdastWithExisting.html new file mode 100644 index 0000000..25433cc --- /dev/null +++ b/test/outputs/command-line.mdastWithExisting.html @@ -0,0 +1,17 @@ + +
+
pwd
+/usr/home/chris/bin
+ls -la
+total 2
+drwxr-xr-x   2 chris  chris     11 Jan 10 16:48 .
+drwxr--r-x  45 chris  chris     92 Feb 14 11:10 ..
+-rwxr-xr-x   1 chris  chris    444 Aug 25  2013 backup
+-rwxr-xr-x   1 chris  chris    642 Jan 17 14:42 deploy
+
+
diff --git a/test/outputs/data-uri-highlight.hast.png b/test/outputs/data-uri-highlight.hast.png index d0d5d1c..0c2e410 100644 Binary files a/test/outputs/data-uri-highlight.hast.png and b/test/outputs/data-uri-highlight.hast.png differ diff --git a/test/outputs/data-uri-highlight.hastWithExisting.html b/test/outputs/data-uri-highlight.hastWithExisting.html new file mode 100644 index 0000000..67922d1 --- /dev/null +++ b/test/outputs/data-uri-highlight.hastWithExisting.html @@ -0,0 +1,14 @@ + +
+
div {
+  border: 40px solid transparent;
+  border-image: 33.334%
+  padding: 1em;
+  max-width: 20em;
+  font: 130%/1.6 Baskerville, Palatino, serif;
+  border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6   c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7   c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7   C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6   c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');
+}
+
+
diff --git a/test/outputs/data-uri-highlight.hastWithExisting.png b/test/outputs/data-uri-highlight.hastWithExisting.png new file mode 100644 index 0000000..0c2e410 Binary files /dev/null and b/test/outputs/data-uri-highlight.hastWithExisting.png differ diff --git a/test/outputs/data-uri-highlight.jsx.png b/test/outputs/data-uri-highlight.jsx.png index d0d5d1c..0c2e410 100644 Binary files a/test/outputs/data-uri-highlight.jsx.png and b/test/outputs/data-uri-highlight.jsx.png differ diff --git a/test/outputs/data-uri-highlight.jsxWithExisting.html b/test/outputs/data-uri-highlight.jsxWithExisting.html new file mode 100644 index 0000000..265e5d1 --- /dev/null +++ b/test/outputs/data-uri-highlight.jsxWithExisting.html @@ -0,0 +1,16 @@ +
+
div {
+  border: 40px solid transparent;
+  border-image: 33.334%
+  padding: 1em;
+  max-width: 20em;
+  font: 130%/1.6 Baskerville, Palatino, serif;
+  border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6   c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7   c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7   C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6   c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');
+}
+
+
diff --git a/test/outputs/data-uri-highlight.jsxWithExisting.png b/test/outputs/data-uri-highlight.jsxWithExisting.png new file mode 100644 index 0000000..0c2e410 Binary files /dev/null and b/test/outputs/data-uri-highlight.jsxWithExisting.png differ diff --git a/test/outputs/data-uri-highlight.mdast.png b/test/outputs/data-uri-highlight.mdast.png index d0d5d1c..0c2e410 100644 Binary files a/test/outputs/data-uri-highlight.mdast.png and b/test/outputs/data-uri-highlight.mdast.png differ diff --git a/test/outputs/data-uri-highlight.mdastWithExisting.html b/test/outputs/data-uri-highlight.mdastWithExisting.html new file mode 100644 index 0000000..67922d1 --- /dev/null +++ b/test/outputs/data-uri-highlight.mdastWithExisting.html @@ -0,0 +1,14 @@ + +
+
div {
+  border: 40px solid transparent;
+  border-image: 33.334%
+  padding: 1em;
+  max-width: 20em;
+  font: 130%/1.6 Baskerville, Palatino, serif;
+  border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6   c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7   c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7   C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6   c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');
+}
+
+
diff --git a/test/outputs/diff-highlight.hast.png b/test/outputs/diff-highlight.hast.png index 10e9e12..6d0be21 100644 Binary files a/test/outputs/diff-highlight.hast.png and b/test/outputs/diff-highlight.hast.png differ diff --git a/test/outputs/diff-highlight.hastWithExisting.html b/test/outputs/diff-highlight.hastWithExisting.html new file mode 100644 index 0000000..24c8741 --- /dev/null +++ b/test/outputs/diff-highlight.hastWithExisting.html @@ -0,0 +1,31 @@ + +
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
+
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
+
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
diff --git a/test/outputs/diff-highlight.hastWithExisting.png b/test/outputs/diff-highlight.hastWithExisting.png new file mode 100644 index 0000000..6d0be21 Binary files /dev/null and b/test/outputs/diff-highlight.hastWithExisting.png differ diff --git a/test/outputs/diff-highlight.jsx.png b/test/outputs/diff-highlight.jsx.png index 10e9e12..6d0be21 100644 Binary files a/test/outputs/diff-highlight.jsx.png and b/test/outputs/diff-highlight.jsx.png differ diff --git a/test/outputs/diff-highlight.jsxWithExisting.html b/test/outputs/diff-highlight.jsxWithExisting.html new file mode 100644 index 0000000..e9c16bf --- /dev/null +++ b/test/outputs/diff-highlight.jsxWithExisting.html @@ -0,0 +1,35 @@ +
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
+
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
+
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
diff --git a/test/outputs/diff-highlight.jsxWithExisting.png b/test/outputs/diff-highlight.jsxWithExisting.png new file mode 100644 index 0000000..6d0be21 Binary files /dev/null and b/test/outputs/diff-highlight.jsxWithExisting.png differ diff --git a/test/outputs/diff-highlight.mdast.png b/test/outputs/diff-highlight.mdast.png index 10e9e12..6d0be21 100644 Binary files a/test/outputs/diff-highlight.mdast.png and b/test/outputs/diff-highlight.mdast.png differ diff --git a/test/outputs/diff-highlight.mdastWithExisting.html b/test/outputs/diff-highlight.mdastWithExisting.html new file mode 100644 index 0000000..24c8741 --- /dev/null +++ b/test/outputs/diff-highlight.mdastWithExisting.html @@ -0,0 +1,31 @@ + +
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
+
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
+
+
@@ -4,6 +4,5 @@
+-  let foo = bar.baz([1, 2, 3]);
+-  foo = foo + 1;
++  const foo = bar.baz([1, 2, 3]) + 1;
+   console.log(`foo: ${foo}`);
+
+
diff --git a/test/outputs/inline-color.hast.png b/test/outputs/inline-color.hast.png index 098bb70..a826cb8 100644 Binary files a/test/outputs/inline-color.hast.png and b/test/outputs/inline-color.hast.png differ diff --git a/test/outputs/inline-color.hastWithExisting.html b/test/outputs/inline-color.hastWithExisting.html new file mode 100644 index 0000000..3d1b501 --- /dev/null +++ b/test/outputs/inline-color.hastWithExisting.html @@ -0,0 +1,34 @@ + +
+
span.foo {
+  background-color: navy;
+  color: #bfd;
+}
+
+span.bar {
+  background: rgba(105, 0, 12, 0.38);
+  color: hsl(30, 100%, 50%);
+  border-color: transparent;
+}
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <title>Example</title>
+    <style>
+      a.not-a-class {
+        color: red;
+      }
+    </style>
+  </head>
+  <body style="color:black"></body>
+</html>
+
+
diff --git a/test/outputs/inline-color.hastWithExisting.png b/test/outputs/inline-color.hastWithExisting.png new file mode 100644 index 0000000..a826cb8 Binary files /dev/null and b/test/outputs/inline-color.hastWithExisting.png differ diff --git a/test/outputs/inline-color.jsx.png b/test/outputs/inline-color.jsx.png index 098bb70..a826cb8 100644 Binary files a/test/outputs/inline-color.jsx.png and b/test/outputs/inline-color.jsx.png differ diff --git a/test/outputs/inline-color.jsxWithExisting.html b/test/outputs/inline-color.jsxWithExisting.html new file mode 100644 index 0000000..2feb8be --- /dev/null +++ b/test/outputs/inline-color.jsxWithExisting.html @@ -0,0 +1,37 @@ +
+
span.foo {
+  background-color: navy;
+  color: #bfd;
+}
+
+span.bar {
+  background: rgba(105, 0, 12, 0.38);
+  color: hsl(30, 100%, 50%);
+  border-color: transparent;
+}
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <title>Example</title>
+    <style>
+      a.not-a-class {
+        color: red;
+      }
+    </style>
+  </head>
+  <body style="color:black"></body>
+</html>
+
+
diff --git a/test/outputs/inline-color.jsxWithExisting.png b/test/outputs/inline-color.jsxWithExisting.png new file mode 100644 index 0000000..a826cb8 Binary files /dev/null and b/test/outputs/inline-color.jsxWithExisting.png differ diff --git a/test/outputs/inline-color.mdast.png b/test/outputs/inline-color.mdast.png index 098bb70..a826cb8 100644 Binary files a/test/outputs/inline-color.mdast.png and b/test/outputs/inline-color.mdast.png differ diff --git a/test/outputs/inline-color.mdastWithExisting.html b/test/outputs/inline-color.mdastWithExisting.html new file mode 100644 index 0000000..3d1b501 --- /dev/null +++ b/test/outputs/inline-color.mdastWithExisting.html @@ -0,0 +1,34 @@ + +
+
span.foo {
+  background-color: navy;
+  color: #bfd;
+}
+
+span.bar {
+  background: rgba(105, 0, 12, 0.38);
+  color: hsl(30, 100%, 50%);
+  border-color: transparent;
+}
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <title>Example</title>
+    <style>
+      a.not-a-class {
+        color: red;
+      }
+    </style>
+  </head>
+  <body style="color:black"></body>
+</html>
+
+
diff --git a/test/outputs/keep-markup.hast.png b/test/outputs/keep-markup.hast.png index 30c6805..8b8260b 100644 Binary files a/test/outputs/keep-markup.hast.png and b/test/outputs/keep-markup.hast.png differ diff --git a/test/outputs/keep-markup.hastWithExisting.html b/test/outputs/keep-markup.hastWithExisting.html new file mode 100644 index 0000000..aafd305 --- /dev/null +++ b/test/outputs/keep-markup.hastWithExisting.html @@ -0,0 +1,7 @@ + +
+
x<span>a</span>y
+
+
diff --git a/test/outputs/keep-markup.hastWithExisting.png b/test/outputs/keep-markup.hastWithExisting.png new file mode 100644 index 0000000..8b8260b Binary files /dev/null and b/test/outputs/keep-markup.hastWithExisting.png differ diff --git a/test/outputs/keep-markup.jsx.png b/test/outputs/keep-markup.jsx.png index 30c6805..8b8260b 100644 Binary files a/test/outputs/keep-markup.jsx.png and b/test/outputs/keep-markup.jsx.png differ diff --git a/test/outputs/keep-markup.jsxWithExisting.html b/test/outputs/keep-markup.jsxWithExisting.html new file mode 100644 index 0000000..6eb5a52 --- /dev/null +++ b/test/outputs/keep-markup.jsxWithExisting.html @@ -0,0 +1,9 @@ +
+
x<span>a</span>y
+
+
diff --git a/test/outputs/keep-markup.jsxWithExisting.png b/test/outputs/keep-markup.jsxWithExisting.png new file mode 100644 index 0000000..8b8260b Binary files /dev/null and b/test/outputs/keep-markup.jsxWithExisting.png differ diff --git a/test/outputs/keep-markup.mdast.png b/test/outputs/keep-markup.mdast.png index 30c6805..8b8260b 100644 Binary files a/test/outputs/keep-markup.mdast.png and b/test/outputs/keep-markup.mdast.png differ diff --git a/test/outputs/keep-markup.mdastWithExisting.html b/test/outputs/keep-markup.mdastWithExisting.html new file mode 100644 index 0000000..aafd305 --- /dev/null +++ b/test/outputs/keep-markup.mdastWithExisting.html @@ -0,0 +1,7 @@ + +
+
x<span>a</span>y
+
+
diff --git a/test/outputs/languages.hast.png b/test/outputs/languages.hast.png index 1fa9537..8c75d62 100644 Binary files a/test/outputs/languages.hast.png and b/test/outputs/languages.hast.png differ diff --git a/test/outputs/languages.hastWithExisting.html b/test/outputs/languages.hastWithExisting.html new file mode 100644 index 0000000..2597a36 --- /dev/null +++ b/test/outputs/languages.hastWithExisting.html @@ -0,0 +1,988 @@ + +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<?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">
+  <title>Hello World</title>
+    <g>
+      <text x="10" y="50">Hello World</text>
+      <animate attributeName="opacity" values="0;1" dur="4s" fill="freeze" begin="0s"/>
+    </g>
+</svg>
+
+
+
+
body::before {
+  content: 'Hello World';
+}
+
+
+
+
console.log('Hello World');
+
+
+
+
class HelloMessage extends React.Component {
+  render() {
+    return <div>Hello {this.props.name}</div>;
+  }
+}
+
+ReactDOM.render(
+  <HelloMessage name="Taylor" />,
+  document.getElementById('hello-example'),
+);
+
+
+
+
REPORT ZHELLO_WORLD.
+
+START-OF-SELECTION.
+    WRITE: 'Hello World'.
+
+
+
+
package
+{
+	import flash.display.Sprite;
+	import flash.text.TextField;
+
+	public class actionscript extends Sprite
+	{
+		private var hello:TextField = new TextField();
+
+		public function actionscript(){
+			hello.text = "Hello World";
+			addChild(hello);
+		}
+	}
+}
+
+
+
+
with Text_IO;
+procedure Hello_World is
+	begin
+		Text_IO.Put_line("Hello World");
+	end Hello_World;
+
+
+
+
'Hello World'
+
+
+
+
display dialog "Hello World"
+
+
+
+
void setup() {
+  Serial.begin(9600);
+  Serial.println("Hello World");
+}
+
+void loop() {
+
+}
+
+
+
+
MsgBox, Hello World
+
+
+
+
MsgBox(0, "Message Box", "Hello World")
+
+
+
+
#!/bin/bash
+
+echo Hello World
+
+
+
+
#!/bin/sh
+echo "Hello World"
+
+
+
+
10 PRINT "Hello World"
+20 END
+
+
+
+
@echo off
+echo Hello World
+
+
+
+
-[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------.
+
+
+
+
#include <stdio.h>
+
+int main() {
+	printf("Hello World\n");
+	return 0;
+}
+
+
+
+
class HelloWorld {
+	static void Main() {
+		System.Console.WriteLine("Hello World");
+	}
+}
+
+
+
+
#include <iostream>
+
+using namespace std;
+
+int main()
+{
+   cout << "Hello World\n";
+}
+
+
+
+
// ilasm cil.il
+.assembly HelloWorld {}
+.method public static void Main() cil managed
+{
+     .entrypoint
+     .maxstack 1
+     ldstr "Hello World"
+     call void [mscorlib]System.Console::WriteLine(string)
+     ret
+}
+
+
+
+
alert "Hello World"
+
+
+
+
(println "Hello World")
+
+
+
+
puts "Hello World"
+
+
+
+
// Hello World in D
+import std.stdio;
+
+void main()
+{
+	   writeln("Hello World");
+}
+
+
+
+
main() {
+  print('Hello World');
+}
+
+
+
+
indexing "Hello World in Eiffel , from http://roesler-ac.de/wolfram/hello.htm#Eiffel"
+
+class HELLO
+
+creation
+	run
+
+feature
+
+	run is
+		local
+			io : BASIC_IO;
+		do
+			!!io;
+			io.put_string("Hello World");
+			io.put_newline
+		end; -- run
+end; -- class HELLO
+
+
+
+
IO.puts "Defining the function world"
+
+
+
+
import Html exposing (text)
+
+main =
+  text "Hello World"
+
+
+
+
-module(erlang_hw).
+-export([start/0]).
+
+start() ->
+  io:format("Hello World~n").
+
+
+
+
printfn "Hello World"
+
+
+
+
USING: io ;
+"Hello World" print
+
+
+
+
program helloworld
+print *,'Hello World'
+end program helloworld
+
+
+
+
extends Label
+
+func _ready():
+  self.text = "Hello World"
+
+
+
+
draw_text(1, 1, "Hello World");
+
+
+
+
package main
+
+import "fmt"
+
+func main() {
+  fmt.Println("Hello World")
+}
+
+
+
+
{
+    "Hello World"
+}
+
+
+
+
println "Hello World"
+
+
+
+
%html
+  %title Hello World
+  %body
+    %h1 Hello World
+
+
+
+
module Main where
+
+main = putStrLn "Hello World"
+
+
+
+
class HelloWorld {
+    static function main() {
+        trace("Hello World");
+    }
+}
+
+
+
+
procedure main()
+    write("Hello World");
+end
+
+
+
+
"Hello World\n" print
+
+
+
+
#!/opt/local/bin/jc
+echo 'Hello World'
+exit ''
+
+
+
+
public class Java {
+	public static void main(String[] args) {
+		System.out.println("Hello World");
+	}
+}
+
+
+
+
{ "hello": "world" }
+
+
+
+
println("Hello World")
+
+
+
+
package hello
+
+fun main() {
+  println("Hello World")
+}
+
+
+
+
\documentclass{article}
+\begin{document}
+Hello World
+\end{document}
+
+
+
+
body::before {
+  content: 'Hello World!';
+}
+
+
+
+
; LISP
+(DEFUN hello ()
+  (PRINT (LIST 'HELLO 'WORLD))
+)
+
+(hello)
+
+
+
+
;;for emacs elisp
+
+(message "hello,world")
+
+
+
+
console.log "Hello World"
+
+
+
+
; llvm-as llvm.ll
+; x86 assembly: llc llvm.bc -o llvm.s -march x86
+; interpreter: lli llvm.bc
+
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
+@.str = internal constant [12 x i8] c"Hello World\00"
+
+; puts from libc
+declare i32 @puts(i8*)
+
+define i32 @main(...) {
+	call i32 @puts(i8* getelementptr([12 x i8]* @.str, i32 0, i32 0))
+	ret i32 0
+}
+
+
+
+
HAI
+CAN HAS STDIO?
+VISIBLE "Hello World"
+KTHXBYE
+
+
+
+
print("Hello World")
+
+
+
+
# Hello World
+
+
+
+
disp('Hello World')
+
+
+
+
proc helloWorld () {
+   print "Hello World\n";
+}
+helloWorld;
+
+
+
+
print 'Hello World'
+
+
+
+
section	.text
+    global _start			;must be declared for linker (ld)
+
+_start:					;tell linker entry point
+
+	xor	ebx,ebx 	;ebx=0
+	mov	ecx,msg		;address of message to write
+	lea	edx,[ebx+len]	;message length
+	lea	eax,[ebx+4]	;system call number (sys_write)
+	inc	ebx		;file descriptor (stdout)
+	int	0x80		;call kernel
+
+	xor	eax, eax	;set eax=0
+	inc	eax		;system call number (sys_exit)
+	int	0x80		;call kernel
+
+section	.rodata
+
+msg	db	'Hello, world!',0xa	;our string
+len	equ	$ - msg			;length of our string
+
+
+
+
echo("Hello World")
+
+
+
+
/*
+ Build on OS X:
+ clang -framework Foundation -fobjc-arc objc.m -o objc
+
+ Build on Linux with GNUstep:
+ clang `gnustep-config --objc-flags` `gnustep-config --base-libs` -fobjc-nonfragile-abi -fobjc-arc objc.m -o objc
+ */
+
+#import <Foundation/Foundation.h>
+
+int main(void)
+{
+    NSLog(@"Hello World");
+}
+
+
+
+
print_string "Hello World\n"
+
+
+
+
{Show 'Hello World'}
+
+
+
+
@main[]
+  ^rem{Will print "Hello World" when run as CGI script}
+  $hello[Hello World]
+  $result[$hello]
+
+
+
+
program HelloWorld(output);
+begin
+        writeln('Hello World');
+end.
+
+
+
+
program ObjectPascalExample;
+
+type
+   THelloWorld = class
+      procedure Put;
+   end;
+
+procedure THelloWorld.Put;
+begin
+   Writeln('Hello World');
+end;
+
+var
+   HelloWorld: THelloWorld;
+
+begin
+   HelloWorld := THelloWorld.Create;
+   HelloWorld.Put;
+   HelloWorld.Free;
+end.
+
+
+
+
#!/usr/local/bin/perl -w
+   use CGI;                             # load CGI routines
+   $q = CGI->new;                        # create new CGI object
+   print $q->header,                    # create the HTTP header
+         $q->start_html('Hello World'), # start the HTML
+         $q->h1('Hello World'),         # level 1 header
+         $q->end_html;                  # end the HTML
+
+ # http://perldoc.perl.org/CGI.html
+
+
+
+
<?php
+
+echo 'Hello World';
+
+
+
+
begin
+  dbms_output.put_line('Hello World');
+end;
+/
+
+
+
+
'Hello World'
+
+
+
+
size(128, 128);
+background(0);
+textAlign(CENTER, CENTER);
+fill(255);
+text("Hello World", width / 2, height / 2);
+
+
+
+
helloWorld :-
+  write('Hello World').
+
+:- helloWorld.
+
+
+
+
doctype html
+html
+    head
+       title Hello World
+    body
+       h1 Hello World
+
+
+
+
module Main where
+
+import Debug.Trace
+
+main = trace "Hello World"
+
+
+
+
If OpenConsole()
+  PrintN("Hello World")
+EndIf
+
+
+
+
#!/usr/bin/env python
+print "Hello World"
+
+
+
+
"Hello World"
+
+
+
+
#!/usr/bin/env qore
+%exec-class HelloWorld
+class HelloWorld
+{
+    constructor()
+    {
+	    background $.say("Hello World");
+    }
+    private say($arg)
+    {
+	    printf("%s\n", $arg);
+    }
+}
+
+
+
+
cat("Hello World\n")
+
+
+
+
#lang racket
+"Hello World"
+
+
+
+
print_string "Hello World"
+
+
+
+
#!/usr/bin/env ruby
+puts "Hello World"
+
+
+
+
fn main() {
+    println!("Hello World");
+}
+
+
+
+
%macro putit( string= );
+     %put &string;
+     %mend;
+
+%putit(string=Hello World)
+
+
+
+
body::before
+	content: "Hello World"
+
+
+
+
object HelloWorld extends App {
+  println("Hello World")
+}
+
+
+
+
(display "Hello World") (newline)
+
+
+
+
#!/bin/sh
+echo "Hello World"
+
+
+
+
Transcript show: 'Hello World'.
+
+
+
+
pragma solidity ^0.6.4;
+
+contract HelloWorld {
+    function render () public pure returns (string memory) {
+        return 'Hello World';
+    }
+}
+
+
+
+
SELECT ?h WHERE {
+  VALUES ?h { "Hello World" }
+}
+
+
+
+
SELECT 'Hello World';
+
+
+
+
body::before
+	content: "Hello World"
+
+
+
+
print("Hello World")
+
+
+
+
puts "Hello World"
+
+
+
+
console.log('Hello World');
+
+
+
+
static void main (string[] args)
+{
+	stdout.printf ("Hello World\n");
+}
+
+
+
+
+
Module HelloWorld
+    Sub Main()
+        System.Console.WriteLine("Hello World")
+    End Sub
+End Module
+
+
+
+
module main;
+  initial
+    begin
+      $display("Hello World");
+      $finish;
+    end
+endmodule
+
+
+
+
use std.textio.all;
+
+entity hello_world is
+end hello_world;
+
+architecture behaviour of hello_world is
+begin
+	process
+    begin
+       write (output, String'("Hello World"));
+       wait;
+    end process;
+end behaviour;
+
+
+
+
echo "Hello World"
+
+
+
+
Module HelloWorld
+    Sub Main()
+        MsgBox("Hello World")
+    End Sub
+End Module
+
+
+
+
Hello World
+
+
+
+
let $hello := "Hello World"
+return $hello
+
+
+
+
hello: world
+
+
diff --git a/test/outputs/languages.hastWithExisting.png b/test/outputs/languages.hastWithExisting.png new file mode 100644 index 0000000..8c75d62 Binary files /dev/null and b/test/outputs/languages.hastWithExisting.png differ diff --git a/test/outputs/languages.jsx.png b/test/outputs/languages.jsx.png index 1fa9537..8c75d62 100644 Binary files a/test/outputs/languages.jsx.png and b/test/outputs/languages.jsx.png differ diff --git a/test/outputs/languages.jsxWithExisting.html b/test/outputs/languages.jsxWithExisting.html new file mode 100644 index 0000000..fa05622 --- /dev/null +++ b/test/outputs/languages.jsxWithExisting.html @@ -0,0 +1,1102 @@ +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<?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">
+  <title>Hello World</title>
+    <g>
+      <text x="10" y="50">Hello World</text>
+      <animate attributeName="opacity" values="0;1" dur="4s" fill="freeze" begin="0s"/>
+    </g>
+</svg>
+
+
+
+
body::before {
+  content: 'Hello World';
+}
+
+
+
+
console.log('Hello World');
+
+
+
+
class HelloMessage extends React.Component {
+  render() {
+    return <div>Hello {this.props.name}</div>;
+  }
+}
+
+ReactDOM.render(
+  <HelloMessage name="Taylor" />,
+  document.getElementById('hello-example'),
+);
+
+
+
+
REPORT ZHELLO_WORLD.
+
+START-OF-SELECTION.
+    WRITE: 'Hello World'.
+
+
+
+
package
+{
+	import flash.display.Sprite;
+	import flash.text.TextField;
+
+	public class actionscript extends Sprite
+	{
+		private var hello:TextField = new TextField();
+
+		public function actionscript(){
+			hello.text = "Hello World";
+			addChild(hello);
+		}
+	}
+}
+
+
+
+
with Text_IO;
+procedure Hello_World is
+	begin
+		Text_IO.Put_line("Hello World");
+	end Hello_World;
+
+
+
+
'Hello World'
+
+
+
+
display dialog "Hello World"
+
+
+
+
void setup() {
+  Serial.begin(9600);
+  Serial.println("Hello World");
+}
+
+void loop() {
+
+}
+
+
+
+
MsgBox, Hello World
+
+
+
+
MsgBox(0, "Message Box", "Hello World")
+
+
+
+
#!/bin/bash
+
+echo Hello World
+
+
+
+
#!/bin/sh
+echo "Hello World"
+
+
+
+
10 PRINT "Hello World"
+20 END
+
+
+
+
@echo off
+echo Hello World
+
+
+
+
-[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------.
+
+
+
+
#include <stdio.h>
+
+int main() {
+	printf("Hello World\n");
+	return 0;
+}
+
+
+
+
class HelloWorld {
+	static void Main() {
+		System.Console.WriteLine("Hello World");
+	}
+}
+
+
+
+
#include <iostream>
+
+using namespace std;
+
+int main()
+{
+   cout << "Hello World\n";
+}
+
+
+
+
// ilasm cil.il
+.assembly HelloWorld {}
+.method public static void Main() cil managed
+{
+     .entrypoint
+     .maxstack 1
+     ldstr "Hello World"
+     call void [mscorlib]System.Console::WriteLine(string)
+     ret
+}
+
+
+
+
alert "Hello World"
+
+
+
+
(println "Hello World")
+
+
+
+
puts "Hello World"
+
+
+
+
// Hello World in D
+import std.stdio;
+
+void main()
+{
+	   writeln("Hello World");
+}
+
+
+
+
main() {
+  print('Hello World');
+}
+
+
+
+
indexing "Hello World in Eiffel , from http://roesler-ac.de/wolfram/hello.htm#Eiffel"
+
+class HELLO
+
+creation
+	run
+
+feature
+
+	run is
+		local
+			io : BASIC_IO;
+		do
+			!!io;
+			io.put_string("Hello World");
+			io.put_newline
+		end; -- run
+end; -- class HELLO
+
+
+
+
IO.puts "Defining the function world"
+
+
+
+
import Html exposing (text)
+
+main =
+  text "Hello World"
+
+
+
+
-module(erlang_hw).
+-export([start/0]).
+
+start() ->
+  io:format("Hello World~n").
+
+
+
+
printfn "Hello World"
+
+
+
+
USING: io ;
+"Hello World" print
+
+
+
+
program helloworld
+print *,'Hello World'
+end program helloworld
+
+
+
+
extends Label
+
+func _ready():
+  self.text = "Hello World"
+
+
+
+
draw_text(1, 1, "Hello World");
+
+
+
+
package main
+
+import "fmt"
+
+func main() {
+  fmt.Println("Hello World")
+}
+
+
+
+
{
+    "Hello World"
+}
+
+
+
+
println "Hello World"
+
+
+
+
%html
+  %title Hello World
+  %body
+    %h1 Hello World
+
+
+
+
module Main where
+
+main = putStrLn "Hello World"
+
+
+
+
class HelloWorld {
+    static function main() {
+        trace("Hello World");
+    }
+}
+
+
+
+
procedure main()
+    write("Hello World");
+end
+
+
+
+
"Hello World\n" print
+
+
+
+
#!/opt/local/bin/jc
+echo 'Hello World'
+exit ''
+
+
+
+
public class Java {
+	public static void main(String[] args) {
+		System.out.println("Hello World");
+	}
+}
+
+
+
+
{ "hello": "world" }
+
+
+
+
println("Hello World")
+
+
+
+
package hello
+
+fun main() {
+  println("Hello World")
+}
+
+
+
+
\documentclass{article}
+\begin{document}
+Hello World
+\end{document}
+
+
+
+
body::before {
+  content: 'Hello World!';
+}
+
+
+
+
; LISP
+(DEFUN hello ()
+  (PRINT (LIST 'HELLO 'WORLD))
+)
+
+(hello)
+
+
+
+
;;for emacs elisp
+
+(message "hello,world")
+
+
+
+
console.log "Hello World"
+
+
+
+
; llvm-as llvm.ll
+; x86 assembly: llc llvm.bc -o llvm.s -march x86
+; interpreter: lli llvm.bc
+
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
+@.str = internal constant [12 x i8] c"Hello World\00"
+
+; puts from libc
+declare i32 @puts(i8*)
+
+define i32 @main(...) {
+	call i32 @puts(i8* getelementptr([12 x i8]* @.str, i32 0, i32 0))
+	ret i32 0
+}
+
+
+
+
HAI
+CAN HAS STDIO?
+VISIBLE "Hello World"
+KTHXBYE
+
+
+
+
print("Hello World")
+
+
+
+
# Hello World
+
+
+
+
disp('Hello World')
+
+
+
+
proc helloWorld () {
+   print "Hello World\n";
+}
+helloWorld;
+
+
+
+
print 'Hello World'
+
+
+
+
section	.text
+    global _start			;must be declared for linker (ld)
+
+_start:					;tell linker entry point
+
+	xor	ebx,ebx 	;ebx=0
+	mov	ecx,msg		;address of message to write
+	lea	edx,[ebx+len]	;message length
+	lea	eax,[ebx+4]	;system call number (sys_write)
+	inc	ebx		;file descriptor (stdout)
+	int	0x80		;call kernel
+
+	xor	eax, eax	;set eax=0
+	inc	eax		;system call number (sys_exit)
+	int	0x80		;call kernel
+
+section	.rodata
+
+msg	db	'Hello, world!',0xa	;our string
+len	equ	$ - msg			;length of our string
+
+
+
+
echo("Hello World")
+
+
+
+
/*
+ Build on OS X:
+ clang -framework Foundation -fobjc-arc objc.m -o objc
+
+ Build on Linux with GNUstep:
+ clang `gnustep-config --objc-flags` `gnustep-config --base-libs` -fobjc-nonfragile-abi -fobjc-arc objc.m -o objc
+ */
+
+#import <Foundation/Foundation.h>
+
+int main(void)
+{
+    NSLog(@"Hello World");
+}
+
+
+
+
print_string "Hello World\n"
+
+
+
+
{Show 'Hello World'}
+
+
+
+
@main[]
+  ^rem{Will print "Hello World" when run as CGI script}
+  $hello[Hello World]
+  $result[$hello]
+
+
+
+
program HelloWorld(output);
+begin
+        writeln('Hello World');
+end.
+
+
+
+
program ObjectPascalExample;
+
+type
+   THelloWorld = class
+      procedure Put;
+   end;
+
+procedure THelloWorld.Put;
+begin
+   Writeln('Hello World');
+end;
+
+var
+   HelloWorld: THelloWorld;
+
+begin
+   HelloWorld := THelloWorld.Create;
+   HelloWorld.Put;
+   HelloWorld.Free;
+end.
+
+
+
+
#!/usr/local/bin/perl -w
+   use CGI;                             # load CGI routines
+   $q = CGI->new;                        # create new CGI object
+   print $q->header,                    # create the HTTP header
+         $q->start_html('Hello World'), # start the HTML
+         $q->h1('Hello World'),         # level 1 header
+         $q->end_html;                  # end the HTML
+
+ # http://perldoc.perl.org/CGI.html
+
+
+
+
<?php
+
+echo 'Hello World';
+
+
+
+
begin
+  dbms_output.put_line('Hello World');
+end;
+/
+
+
+
+
'Hello World'
+
+
+
+
size(128, 128);
+background(0);
+textAlign(CENTER, CENTER);
+fill(255);
+text("Hello World", width / 2, height / 2);
+
+
+
+
helloWorld :-
+  write('Hello World').
+
+:- helloWorld.
+
+
+
+
doctype html
+html
+    head
+       title Hello World
+    body
+       h1 Hello World
+
+
+
+
module Main where
+
+import Debug.Trace
+
+main = trace "Hello World"
+
+
+
+
If OpenConsole()
+  PrintN("Hello World")
+EndIf
+
+
+
+
#!/usr/bin/env python
+print "Hello World"
+
+
+
+
"Hello World"
+
+
+
+
#!/usr/bin/env qore
+%exec-class HelloWorld
+class HelloWorld
+{
+    constructor()
+    {
+	    background $.say("Hello World");
+    }
+    private say($arg)
+    {
+	    printf("%s\n", $arg);
+    }
+}
+
+
+
+
cat("Hello World\n")
+
+
+
+
#lang racket
+"Hello World"
+
+
+
+
print_string "Hello World"
+
+
+
+
#!/usr/bin/env ruby
+puts "Hello World"
+
+
+
+
fn main() {
+    println!("Hello World");
+}
+
+
+
+
%macro putit( string= );
+     %put &string;
+     %mend;
+
+%putit(string=Hello World)
+
+
+
+
body::before
+	content: "Hello World"
+
+
+
+
object HelloWorld extends App {
+  println("Hello World")
+}
+
+
+
+
(display "Hello World") (newline)
+
+
+
+
#!/bin/sh
+echo "Hello World"
+
+
+
+
Transcript show: 'Hello World'.
+
+
+
+
pragma solidity ^0.6.4;
+
+contract HelloWorld {
+    function render () public pure returns (string memory) {
+        return 'Hello World';
+    }
+}
+
+
+
+
SELECT ?h WHERE {
+  VALUES ?h { "Hello World" }
+}
+
+
+
+
SELECT 'Hello World';
+
+
+
+
body::before
+	content: "Hello World"
+
+
+
+
print("Hello World")
+
+
+
+
puts "Hello World"
+
+
+
+
console.log('Hello World');
+
+
+
+
static void main (string[] args)
+{
+	stdout.printf ("Hello World\n");
+}
+
+
+
+
+
Module HelloWorld
+    Sub Main()
+        System.Console.WriteLine("Hello World")
+    End Sub
+End Module
+
+
+
+
module main;
+  initial
+    begin
+      $display("Hello World");
+      $finish;
+    end
+endmodule
+
+
+
+
use std.textio.all;
+
+entity hello_world is
+end hello_world;
+
+architecture behaviour of hello_world is
+begin
+	process
+    begin
+       write (output, String'("Hello World"));
+       wait;
+    end process;
+end behaviour;
+
+
+
+
echo "Hello World"
+
+
+
+
Module HelloWorld
+    Sub Main()
+        MsgBox("Hello World")
+    End Sub
+End Module
+
+
+
+
Hello World
+
+
+
+
let $hello := "Hello World"
+return $hello
+
+
+
+
hello: world
+
+
diff --git a/test/outputs/languages.jsxWithExisting.png b/test/outputs/languages.jsxWithExisting.png new file mode 100644 index 0000000..8c75d62 Binary files /dev/null and b/test/outputs/languages.jsxWithExisting.png differ diff --git a/test/outputs/languages.mdast.png b/test/outputs/languages.mdast.png index 1fa9537..8c75d62 100644 Binary files a/test/outputs/languages.mdast.png and b/test/outputs/languages.mdast.png differ diff --git a/test/outputs/languages.mdastWithExisting.html b/test/outputs/languages.mdastWithExisting.html new file mode 100644 index 0000000..2597a36 --- /dev/null +++ b/test/outputs/languages.mdastWithExisting.html @@ -0,0 +1,988 @@ + +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<?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">
+  <title>Hello World</title>
+    <g>
+      <text x="10" y="50">Hello World</text>
+      <animate attributeName="opacity" values="0;1" dur="4s" fill="freeze" begin="0s"/>
+    </g>
+</svg>
+
+
+
+
body::before {
+  content: 'Hello World';
+}
+
+
+
+
console.log('Hello World');
+
+
+
+
class HelloMessage extends React.Component {
+  render() {
+    return <div>Hello {this.props.name}</div>;
+  }
+}
+
+ReactDOM.render(
+  <HelloMessage name="Taylor" />,
+  document.getElementById('hello-example'),
+);
+
+
+
+
REPORT ZHELLO_WORLD.
+
+START-OF-SELECTION.
+    WRITE: 'Hello World'.
+
+
+
+
package
+{
+	import flash.display.Sprite;
+	import flash.text.TextField;
+
+	public class actionscript extends Sprite
+	{
+		private var hello:TextField = new TextField();
+
+		public function actionscript(){
+			hello.text = "Hello World";
+			addChild(hello);
+		}
+	}
+}
+
+
+
+
with Text_IO;
+procedure Hello_World is
+	begin
+		Text_IO.Put_line("Hello World");
+	end Hello_World;
+
+
+
+
'Hello World'
+
+
+
+
display dialog "Hello World"
+
+
+
+
void setup() {
+  Serial.begin(9600);
+  Serial.println("Hello World");
+}
+
+void loop() {
+
+}
+
+
+
+
MsgBox, Hello World
+
+
+
+
MsgBox(0, "Message Box", "Hello World")
+
+
+
+
#!/bin/bash
+
+echo Hello World
+
+
+
+
#!/bin/sh
+echo "Hello World"
+
+
+
+
10 PRINT "Hello World"
+20 END
+
+
+
+
@echo off
+echo Hello World
+
+
+
+
-[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------.
+
+
+
+
#include <stdio.h>
+
+int main() {
+	printf("Hello World\n");
+	return 0;
+}
+
+
+
+
class HelloWorld {
+	static void Main() {
+		System.Console.WriteLine("Hello World");
+	}
+}
+
+
+
+
#include <iostream>
+
+using namespace std;
+
+int main()
+{
+   cout << "Hello World\n";
+}
+
+
+
+
// ilasm cil.il
+.assembly HelloWorld {}
+.method public static void Main() cil managed
+{
+     .entrypoint
+     .maxstack 1
+     ldstr "Hello World"
+     call void [mscorlib]System.Console::WriteLine(string)
+     ret
+}
+
+
+
+
alert "Hello World"
+
+
+
+
(println "Hello World")
+
+
+
+
puts "Hello World"
+
+
+
+
// Hello World in D
+import std.stdio;
+
+void main()
+{
+	   writeln("Hello World");
+}
+
+
+
+
main() {
+  print('Hello World');
+}
+
+
+
+
indexing "Hello World in Eiffel , from http://roesler-ac.de/wolfram/hello.htm#Eiffel"
+
+class HELLO
+
+creation
+	run
+
+feature
+
+	run is
+		local
+			io : BASIC_IO;
+		do
+			!!io;
+			io.put_string("Hello World");
+			io.put_newline
+		end; -- run
+end; -- class HELLO
+
+
+
+
IO.puts "Defining the function world"
+
+
+
+
import Html exposing (text)
+
+main =
+  text "Hello World"
+
+
+
+
-module(erlang_hw).
+-export([start/0]).
+
+start() ->
+  io:format("Hello World~n").
+
+
+
+
printfn "Hello World"
+
+
+
+
USING: io ;
+"Hello World" print
+
+
+
+
program helloworld
+print *,'Hello World'
+end program helloworld
+
+
+
+
extends Label
+
+func _ready():
+  self.text = "Hello World"
+
+
+
+
draw_text(1, 1, "Hello World");
+
+
+
+
package main
+
+import "fmt"
+
+func main() {
+  fmt.Println("Hello World")
+}
+
+
+
+
{
+    "Hello World"
+}
+
+
+
+
println "Hello World"
+
+
+
+
%html
+  %title Hello World
+  %body
+    %h1 Hello World
+
+
+
+
module Main where
+
+main = putStrLn "Hello World"
+
+
+
+
class HelloWorld {
+    static function main() {
+        trace("Hello World");
+    }
+}
+
+
+
+
procedure main()
+    write("Hello World");
+end
+
+
+
+
"Hello World\n" print
+
+
+
+
#!/opt/local/bin/jc
+echo 'Hello World'
+exit ''
+
+
+
+
public class Java {
+	public static void main(String[] args) {
+		System.out.println("Hello World");
+	}
+}
+
+
+
+
{ "hello": "world" }
+
+
+
+
println("Hello World")
+
+
+
+
package hello
+
+fun main() {
+  println("Hello World")
+}
+
+
+
+
\documentclass{article}
+\begin{document}
+Hello World
+\end{document}
+
+
+
+
body::before {
+  content: 'Hello World!';
+}
+
+
+
+
; LISP
+(DEFUN hello ()
+  (PRINT (LIST 'HELLO 'WORLD))
+)
+
+(hello)
+
+
+
+
;;for emacs elisp
+
+(message "hello,world")
+
+
+
+
console.log "Hello World"
+
+
+
+
; llvm-as llvm.ll
+; x86 assembly: llc llvm.bc -o llvm.s -march x86
+; interpreter: lli llvm.bc
+
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
+@.str = internal constant [12 x i8] c"Hello World\00"
+
+; puts from libc
+declare i32 @puts(i8*)
+
+define i32 @main(...) {
+	call i32 @puts(i8* getelementptr([12 x i8]* @.str, i32 0, i32 0))
+	ret i32 0
+}
+
+
+
+
HAI
+CAN HAS STDIO?
+VISIBLE "Hello World"
+KTHXBYE
+
+
+
+
print("Hello World")
+
+
+
+
# Hello World
+
+
+
+
disp('Hello World')
+
+
+
+
proc helloWorld () {
+   print "Hello World\n";
+}
+helloWorld;
+
+
+
+
print 'Hello World'
+
+
+
+
section	.text
+    global _start			;must be declared for linker (ld)
+
+_start:					;tell linker entry point
+
+	xor	ebx,ebx 	;ebx=0
+	mov	ecx,msg		;address of message to write
+	lea	edx,[ebx+len]	;message length
+	lea	eax,[ebx+4]	;system call number (sys_write)
+	inc	ebx		;file descriptor (stdout)
+	int	0x80		;call kernel
+
+	xor	eax, eax	;set eax=0
+	inc	eax		;system call number (sys_exit)
+	int	0x80		;call kernel
+
+section	.rodata
+
+msg	db	'Hello, world!',0xa	;our string
+len	equ	$ - msg			;length of our string
+
+
+
+
echo("Hello World")
+
+
+
+
/*
+ Build on OS X:
+ clang -framework Foundation -fobjc-arc objc.m -o objc
+
+ Build on Linux with GNUstep:
+ clang `gnustep-config --objc-flags` `gnustep-config --base-libs` -fobjc-nonfragile-abi -fobjc-arc objc.m -o objc
+ */
+
+#import <Foundation/Foundation.h>
+
+int main(void)
+{
+    NSLog(@"Hello World");
+}
+
+
+
+
print_string "Hello World\n"
+
+
+
+
{Show 'Hello World'}
+
+
+
+
@main[]
+  ^rem{Will print "Hello World" when run as CGI script}
+  $hello[Hello World]
+  $result[$hello]
+
+
+
+
program HelloWorld(output);
+begin
+        writeln('Hello World');
+end.
+
+
+
+
program ObjectPascalExample;
+
+type
+   THelloWorld = class
+      procedure Put;
+   end;
+
+procedure THelloWorld.Put;
+begin
+   Writeln('Hello World');
+end;
+
+var
+   HelloWorld: THelloWorld;
+
+begin
+   HelloWorld := THelloWorld.Create;
+   HelloWorld.Put;
+   HelloWorld.Free;
+end.
+
+
+
+
#!/usr/local/bin/perl -w
+   use CGI;                             # load CGI routines
+   $q = CGI->new;                        # create new CGI object
+   print $q->header,                    # create the HTTP header
+         $q->start_html('Hello World'), # start the HTML
+         $q->h1('Hello World'),         # level 1 header
+         $q->end_html;                  # end the HTML
+
+ # http://perldoc.perl.org/CGI.html
+
+
+
+
<?php
+
+echo 'Hello World';
+
+
+
+
begin
+  dbms_output.put_line('Hello World');
+end;
+/
+
+
+
+
'Hello World'
+
+
+
+
size(128, 128);
+background(0);
+textAlign(CENTER, CENTER);
+fill(255);
+text("Hello World", width / 2, height / 2);
+
+
+
+
helloWorld :-
+  write('Hello World').
+
+:- helloWorld.
+
+
+
+
doctype html
+html
+    head
+       title Hello World
+    body
+       h1 Hello World
+
+
+
+
module Main where
+
+import Debug.Trace
+
+main = trace "Hello World"
+
+
+
+
If OpenConsole()
+  PrintN("Hello World")
+EndIf
+
+
+
+
#!/usr/bin/env python
+print "Hello World"
+
+
+
+
"Hello World"
+
+
+
+
#!/usr/bin/env qore
+%exec-class HelloWorld
+class HelloWorld
+{
+    constructor()
+    {
+	    background $.say("Hello World");
+    }
+    private say($arg)
+    {
+	    printf("%s\n", $arg);
+    }
+}
+
+
+
+
cat("Hello World\n")
+
+
+
+
#lang racket
+"Hello World"
+
+
+
+
print_string "Hello World"
+
+
+
+
#!/usr/bin/env ruby
+puts "Hello World"
+
+
+
+
fn main() {
+    println!("Hello World");
+}
+
+
+
+
%macro putit( string= );
+     %put &string;
+     %mend;
+
+%putit(string=Hello World)
+
+
+
+
body::before
+	content: "Hello World"
+
+
+
+
object HelloWorld extends App {
+  println("Hello World")
+}
+
+
+
+
(display "Hello World") (newline)
+
+
+
+
#!/bin/sh
+echo "Hello World"
+
+
+
+
Transcript show: 'Hello World'.
+
+
+
+
pragma solidity ^0.6.4;
+
+contract HelloWorld {
+    function render () public pure returns (string memory) {
+        return 'Hello World';
+    }
+}
+
+
+
+
SELECT ?h WHERE {
+  VALUES ?h { "Hello World" }
+}
+
+
+
+
SELECT 'Hello World';
+
+
+
+
body::before
+	content: "Hello World"
+
+
+
+
print("Hello World")
+
+
+
+
puts "Hello World"
+
+
+
+
console.log('Hello World');
+
+
+
+
static void main (string[] args)
+{
+	stdout.printf ("Hello World\n");
+}
+
+
+
+
+
Module HelloWorld
+    Sub Main()
+        System.Console.WriteLine("Hello World")
+    End Sub
+End Module
+
+
+
+
module main;
+  initial
+    begin
+      $display("Hello World");
+      $finish;
+    end
+endmodule
+
+
+
+
use std.textio.all;
+
+entity hello_world is
+end hello_world;
+
+architecture behaviour of hello_world is
+begin
+	process
+    begin
+       write (output, String'("Hello World"));
+       wait;
+    end process;
+end behaviour;
+
+
+
+
echo "Hello World"
+
+
+
+
Module HelloWorld
+    Sub Main()
+        MsgBox("Hello World")
+    End Sub
+End Module
+
+
+
+
Hello World
+
+
+
+
let $hello := "Hello World"
+return $hello
+
+
+
+
hello: world
+
+
diff --git a/test/outputs/legend.hast.png b/test/outputs/legend.hast.png index 39dc15e..14c3295 100644 Binary files a/test/outputs/legend.hast.png and b/test/outputs/legend.hast.png differ diff --git a/test/outputs/legend.hastWithExisting.html b/test/outputs/legend.hastWithExisting.html new file mode 100644 index 0000000..5a96ba4 --- /dev/null +++ b/test/outputs/legend.hastWithExisting.html @@ -0,0 +1,18 @@ + +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+ file.html +
diff --git a/test/outputs/legend.hastWithExisting.png b/test/outputs/legend.hastWithExisting.png new file mode 100644 index 0000000..14c3295 Binary files /dev/null and b/test/outputs/legend.hastWithExisting.png differ diff --git a/test/outputs/legend.jsx.png b/test/outputs/legend.jsx.png index 39dc15e..14c3295 100644 Binary files a/test/outputs/legend.jsx.png and b/test/outputs/legend.jsx.png differ diff --git a/test/outputs/legend.jsxWithExisting.html b/test/outputs/legend.jsxWithExisting.html new file mode 100644 index 0000000..1549faf --- /dev/null +++ b/test/outputs/legend.jsxWithExisting.html @@ -0,0 +1,20 @@ +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+ file.html +
diff --git a/test/outputs/legend.jsxWithExisting.png b/test/outputs/legend.jsxWithExisting.png new file mode 100644 index 0000000..14c3295 Binary files /dev/null and b/test/outputs/legend.jsxWithExisting.png differ diff --git a/test/outputs/legend.mdast.png b/test/outputs/legend.mdast.png index 39dc15e..14c3295 100644 Binary files a/test/outputs/legend.mdast.png and b/test/outputs/legend.mdast.png differ diff --git a/test/outputs/legend.mdastWithExisting.html b/test/outputs/legend.mdastWithExisting.html new file mode 100644 index 0000000..5a96ba4 --- /dev/null +++ b/test/outputs/legend.mdastWithExisting.html @@ -0,0 +1,18 @@ + +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+ file.html +
diff --git a/test/outputs/line-highlight.hast.png b/test/outputs/line-highlight.hast.png index fe8a546..7a6758a 100644 Binary files a/test/outputs/line-highlight.hast.png and b/test/outputs/line-highlight.hast.png differ diff --git a/test/outputs/line-highlight.hastWithExisting.html b/test/outputs/line-highlight.hastWithExisting.html new file mode 100644 index 0000000..64634be --- /dev/null +++ b/test/outputs/line-highlight.hastWithExisting.html @@ -0,0 +1,61 @@ + +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
export default () => {
+  // register current used theme
+  const [theme, setTheme] = React.useState(themes.light);
+
+  // handle the radio changes
+  const handleChange = ({ target }) => {
+    // based on the radio value, toggle to the correct theme
+    return setTheme(themes[target.value]);
+  };
+
+  return (
+    <ThemeProvider value={theme}>
+      <Button>I am styled by theme context!</Button>
+      <form onChange={handleChange}>
+        <p>Please select your theme:</p>
+        <input type="radio" id="light" name="theme" value="light" />
+        <label for="light">Light</label>
+        <input type="radio" id="dark" name="theme" value="dark" />
+        <label for="dark">Dark</label>
+      </form>
+    </ThemeProvider>
+  );
+};
+
+
diff --git a/test/outputs/line-highlight.hastWithExisting.png b/test/outputs/line-highlight.hastWithExisting.png new file mode 100644 index 0000000..7a6758a Binary files /dev/null and b/test/outputs/line-highlight.hastWithExisting.png differ diff --git a/test/outputs/line-highlight.jsx.png b/test/outputs/line-highlight.jsx.png index fe8a546..7a6758a 100644 Binary files a/test/outputs/line-highlight.jsx.png and b/test/outputs/line-highlight.jsx.png differ diff --git a/test/outputs/line-highlight.jsxWithExisting.html b/test/outputs/line-highlight.jsxWithExisting.html new file mode 100644 index 0000000..d00b9d8 --- /dev/null +++ b/test/outputs/line-highlight.jsxWithExisting.html @@ -0,0 +1,65 @@ +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
export default () => {
+  // register current used theme
+  const [theme, setTheme] = React.useState(themes.light);
+
+  // handle the radio changes
+  const handleChange = ({ target }) => {
+    // based on the radio value, toggle to the correct theme
+    return setTheme(themes[target.value]);
+  };
+
+  return (
+    <ThemeProvider value={theme}>
+      <Button>I am styled by theme context!</Button>
+      <form onChange={handleChange}>
+        <p>Please select your theme:</p>
+        <input type="radio" id="light" name="theme" value="light" />
+        <label for="light">Light</label>
+        <input type="radio" id="dark" name="theme" value="dark" />
+        <label for="dark">Dark</label>
+      </form>
+    </ThemeProvider>
+  );
+};
+
+
diff --git a/test/outputs/line-highlight.jsxWithExisting.png b/test/outputs/line-highlight.jsxWithExisting.png new file mode 100644 index 0000000..7a6758a Binary files /dev/null and b/test/outputs/line-highlight.jsxWithExisting.png differ diff --git a/test/outputs/line-highlight.mdast.png b/test/outputs/line-highlight.mdast.png index fe8a546..7a6758a 100644 Binary files a/test/outputs/line-highlight.mdast.png and b/test/outputs/line-highlight.mdast.png differ diff --git a/test/outputs/line-highlight.mdastWithExisting.html b/test/outputs/line-highlight.mdastWithExisting.html new file mode 100644 index 0000000..64634be --- /dev/null +++ b/test/outputs/line-highlight.mdastWithExisting.html @@ -0,0 +1,61 @@ + +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
export default () => {
+  // register current used theme
+  const [theme, setTheme] = React.useState(themes.light);
+
+  // handle the radio changes
+  const handleChange = ({ target }) => {
+    // based on the radio value, toggle to the correct theme
+    return setTheme(themes[target.value]);
+  };
+
+  return (
+    <ThemeProvider value={theme}>
+      <Button>I am styled by theme context!</Button>
+      <form onChange={handleChange}>
+        <p>Please select your theme:</p>
+        <input type="radio" id="light" name="theme" value="light" />
+        <label for="light">Light</label>
+        <input type="radio" id="dark" name="theme" value="dark" />
+        <label for="dark">Dark</label>
+      </form>
+    </ThemeProvider>
+  );
+};
+
+
diff --git a/test/outputs/line-numbers.hast.png b/test/outputs/line-numbers.hast.png index 614fd2e..1a5e0d3 100644 Binary files a/test/outputs/line-numbers.hast.png and b/test/outputs/line-numbers.hast.png differ diff --git a/test/outputs/line-numbers.hastWithExisting.html b/test/outputs/line-numbers.hastWithExisting.html new file mode 100644 index 0000000..3066ffb --- /dev/null +++ b/test/outputs/line-numbers.hastWithExisting.html @@ -0,0 +1,49 @@ + +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
diff --git a/test/outputs/line-numbers.hastWithExisting.png b/test/outputs/line-numbers.hastWithExisting.png new file mode 100644 index 0000000..1a5e0d3 Binary files /dev/null and b/test/outputs/line-numbers.hastWithExisting.png differ diff --git a/test/outputs/line-numbers.jsx.png b/test/outputs/line-numbers.jsx.png index 614fd2e..1a5e0d3 100644 Binary files a/test/outputs/line-numbers.jsx.png and b/test/outputs/line-numbers.jsx.png differ diff --git a/test/outputs/line-numbers.jsxWithExisting.html b/test/outputs/line-numbers.jsxWithExisting.html new file mode 100644 index 0000000..bac040e --- /dev/null +++ b/test/outputs/line-numbers.jsxWithExisting.html @@ -0,0 +1,52 @@ +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
diff --git a/test/outputs/line-numbers.jsxWithExisting.png b/test/outputs/line-numbers.jsxWithExisting.png new file mode 100644 index 0000000..1a5e0d3 Binary files /dev/null and b/test/outputs/line-numbers.jsxWithExisting.png differ diff --git a/test/outputs/line-numbers.mdast.png b/test/outputs/line-numbers.mdast.png index 614fd2e..1a5e0d3 100644 Binary files a/test/outputs/line-numbers.mdast.png and b/test/outputs/line-numbers.mdast.png differ diff --git a/test/outputs/line-numbers.mdastWithExisting.html b/test/outputs/line-numbers.mdastWithExisting.html new file mode 100644 index 0000000..3066ffb --- /dev/null +++ b/test/outputs/line-numbers.mdastWithExisting.html @@ -0,0 +1,49 @@ + +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
+
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
diff --git a/test/outputs/no-lang.hast.png b/test/outputs/no-lang.hast.png index 44049de..e7cc951 100644 Binary files a/test/outputs/no-lang.hast.png and b/test/outputs/no-lang.hast.png differ diff --git a/test/outputs/no-lang.hastWithExisting.html b/test/outputs/no-lang.hastWithExisting.html new file mode 100644 index 0000000..fa56c38 --- /dev/null +++ b/test/outputs/no-lang.hastWithExisting.html @@ -0,0 +1,5 @@ + +
+
hello
+world
+
diff --git a/test/outputs/no-lang.hastWithExisting.png b/test/outputs/no-lang.hastWithExisting.png new file mode 100644 index 0000000..e7cc951 Binary files /dev/null and b/test/outputs/no-lang.hastWithExisting.png differ diff --git a/test/outputs/no-lang.jsx.png b/test/outputs/no-lang.jsx.png index 44049de..e7cc951 100644 Binary files a/test/outputs/no-lang.jsx.png and b/test/outputs/no-lang.jsx.png differ diff --git a/test/outputs/no-lang.jsxWithExisting.html b/test/outputs/no-lang.jsxWithExisting.html new file mode 100644 index 0000000..585ab65 --- /dev/null +++ b/test/outputs/no-lang.jsxWithExisting.html @@ -0,0 +1,9 @@ +
+
hello
+world
+
diff --git a/test/outputs/no-lang.jsxWithExisting.png b/test/outputs/no-lang.jsxWithExisting.png new file mode 100644 index 0000000..e7cc951 Binary files /dev/null and b/test/outputs/no-lang.jsxWithExisting.png differ diff --git a/test/outputs/no-lang.mdast.png b/test/outputs/no-lang.mdast.png index 44049de..e7cc951 100644 Binary files a/test/outputs/no-lang.mdast.png and b/test/outputs/no-lang.mdast.png differ diff --git a/test/outputs/no-lang.mdastWithExisting.html b/test/outputs/no-lang.mdastWithExisting.html new file mode 100644 index 0000000..fa56c38 --- /dev/null +++ b/test/outputs/no-lang.mdastWithExisting.html @@ -0,0 +1,5 @@ + +
+
hello
+world
+
diff --git a/test/outputs/show-invisibles.hast.png b/test/outputs/show-invisibles.hast.png index a7991b1..bf481ff 100644 Binary files a/test/outputs/show-invisibles.hast.png and b/test/outputs/show-invisibles.hast.png differ diff --git a/test/outputs/show-invisibles.hastWithExisting.html b/test/outputs/show-invisibles.hastWithExisting.html new file mode 100644 index 0000000..360ea97 --- /dev/null +++ b/test/outputs/show-invisibles.hastWithExisting.html @@ -0,0 +1,17 @@ + +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
diff --git a/test/outputs/show-invisibles.hastWithExisting.png b/test/outputs/show-invisibles.hastWithExisting.png new file mode 100644 index 0000000..bf481ff Binary files /dev/null and b/test/outputs/show-invisibles.hastWithExisting.png differ diff --git a/test/outputs/show-invisibles.jsx.png b/test/outputs/show-invisibles.jsx.png index a7991b1..bf481ff 100644 Binary files a/test/outputs/show-invisibles.jsx.png and b/test/outputs/show-invisibles.jsx.png differ diff --git a/test/outputs/show-invisibles.jsxWithExisting.html b/test/outputs/show-invisibles.jsxWithExisting.html new file mode 100644 index 0000000..482050f --- /dev/null +++ b/test/outputs/show-invisibles.jsxWithExisting.html @@ -0,0 +1,19 @@ +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
diff --git a/test/outputs/show-invisibles.jsxWithExisting.png b/test/outputs/show-invisibles.jsxWithExisting.png new file mode 100644 index 0000000..bf481ff Binary files /dev/null and b/test/outputs/show-invisibles.jsxWithExisting.png differ diff --git a/test/outputs/show-invisibles.mdast.png b/test/outputs/show-invisibles.mdast.png index a7991b1..bf481ff 100644 Binary files a/test/outputs/show-invisibles.mdast.png and b/test/outputs/show-invisibles.mdast.png differ diff --git a/test/outputs/show-invisibles.mdastWithExisting.html b/test/outputs/show-invisibles.mdastWithExisting.html new file mode 100644 index 0000000..360ea97 --- /dev/null +++ b/test/outputs/show-invisibles.mdastWithExisting.html @@ -0,0 +1,17 @@ + +
+
<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Hello World!</title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+  </body>
+</html>
+
+
diff --git a/test/outputs/treeview.hast.png b/test/outputs/treeview.hast.png index 2b45d6e..6c0a71c 100644 Binary files a/test/outputs/treeview.hast.png and b/test/outputs/treeview.hast.png differ diff --git a/test/outputs/treeview.hastWithExisting.html b/test/outputs/treeview.hastWithExisting.html new file mode 100644 index 0000000..b1f2bf6 --- /dev/null +++ b/test/outputs/treeview.hastWithExisting.html @@ -0,0 +1,22 @@ + +
+
.
+├── .eslintignore
+├── .eslintrc
+├── .gitignore
+├── .prettierignore
+├── .prettierrc
+├── .yarnrc.yml
+├── README.md
+├── index.js
+├── package.json
+├── test
+├── fixtures
+└── index.js
+└── yarn.lock
+
+7 directories, 41 files
+
+
diff --git a/test/outputs/treeview.hastWithExisting.png b/test/outputs/treeview.hastWithExisting.png new file mode 100644 index 0000000..6c0a71c Binary files /dev/null and b/test/outputs/treeview.hastWithExisting.png differ diff --git a/test/outputs/treeview.jsx.png b/test/outputs/treeview.jsx.png index 2b45d6e..6c0a71c 100644 Binary files a/test/outputs/treeview.jsx.png and b/test/outputs/treeview.jsx.png differ diff --git a/test/outputs/treeview.jsxWithExisting.html b/test/outputs/treeview.jsxWithExisting.html new file mode 100644 index 0000000..cb011b0 --- /dev/null +++ b/test/outputs/treeview.jsxWithExisting.html @@ -0,0 +1,24 @@ +
+
.
+├── .eslintignore
+├── .eslintrc
+├── .gitignore
+├── .prettierignore
+├── .prettierrc
+├── .yarnrc.yml
+├── README.md
+├── index.js
+├── package.json
+├── test
+├── fixtures
+└── index.js
+└── yarn.lock
+
+7 directories, 41 files
+
+
diff --git a/test/outputs/treeview.jsxWithExisting.png b/test/outputs/treeview.jsxWithExisting.png new file mode 100644 index 0000000..6c0a71c Binary files /dev/null and b/test/outputs/treeview.jsxWithExisting.png differ diff --git a/test/outputs/treeview.mdast.png b/test/outputs/treeview.mdast.png index 2b45d6e..6c0a71c 100644 Binary files a/test/outputs/treeview.mdast.png and b/test/outputs/treeview.mdast.png differ diff --git a/test/outputs/treeview.mdastWithExisting.html b/test/outputs/treeview.mdastWithExisting.html new file mode 100644 index 0000000..b1f2bf6 --- /dev/null +++ b/test/outputs/treeview.mdastWithExisting.html @@ -0,0 +1,22 @@ + +
+
.
+├── .eslintignore
+├── .eslintrc
+├── .gitignore
+├── .prettierignore
+├── .prettierrc
+├── .yarnrc.yml
+├── README.md
+├── index.js
+├── package.json
+├── test
+├── fixtures
+└── index.js
+└── yarn.lock
+
+7 directories, 41 files
+
+
diff --git a/test/snapshots/index.js.md b/test/snapshots/index.js.md index 79ed778..142cbd1 100644 --- a/test/snapshots/index.js.md +++ b/test/snapshots/index.js.md @@ -4714,3 +4714,4714 @@ Generated by [AVA](https://avajs.dev). ␊ ` + +## all + +> Snapshot 4 + + `␊ +

hello from remark-prism

␊ +

welcome all.

␊ +
␊ + [Text you want to see](http://url-goes-here.com)␊ + ␊ +
␊ +
␊ + pwd␊ + /usr/home/chris/bin␊ + ls -la␊ + total 2␊ + drwxr-xr-x 2 chris chris 11 Jan 10 16:48 .␊ + drwxr--r-x 45 chris chris 92 Feb 14 11:10 ..␊ + -rwxr-xr-x 1 chris chris 444 Aug 25 2013 backup␊ + -rwxr-xr-x 1 chris chris 642 Jan 17 14:42 deploy␊ + ␊ +
␊ +
␊ + div {␊ + border: 40px solid transparent;␊ + border-image: 33.334%␊ + padding: 1em;␊ + max-width: 20em;␊ + font: 130%/1.6 Baskerville, Palatino, serif;␊ + border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6 c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7 c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7 C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6 c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');␊ + }␊ + ␊ +
␊ +
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ +
␊ + span.foo {␊ + background-color: navy;␊ + color: #bfd;␊ + }␊ + ␊ + span.bar {␊ + background: rgba(105, 0, 12, 0.38);␊ + color: hsl(30, 100%, 50%);␊ + border-color: transparent;␊ + }␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ + file.html␊ +
␊ +
␊ + export default () => {␊ + // register current used theme␊ + const [theme, setTheme] = React.useState(themes.light);␊ + ␊ + // handle the radio changes␊ + const handleChange = ({ target }) => {␊ + // based on the radio value, toggle to the correct theme␊ + return setTheme(themes[target.value]);␊ + };␊ + ␊ + return (␊ + <ThemeProvider value={theme}>␊ + <Button>I am styled by theme context!</Button>␊ + <form onChange={handleChange}>␊ + <p>Please select your theme:</p>␊ + <input type="radio" id="light" name="theme" value="light" />␊ + <label for="light">Light</label>␊ + <input type="radio" id="dark" name="theme" value="dark" />␊ + <label for="dark">Dark</label>␊ + </form>␊ + </ThemeProvider>␊ + );␊ + };␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ +
hello␊
+    world
␊ +
␊ +
␊ + .␊ + ├── .eslintignore␊ + ├── .eslintrc␊ + ├── .gitignore␊ + ├── .prettierignore␊ + ├── .prettierrc␊ + ├── .yarnrc.yml␊ + ├── README.md␊ + ├── index.js␊ + ├── package.json␊ + ├── test␊ + ├── fixtures␊ + └── index.js␊ + └── yarn.lock␊ + ␊ + 7 directories, 41 files␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +

hello from remark-prism

␊ +

welcome all.

␊ +
␊ + [Text you want to see](http://url-goes-here.com)␊ + ␊ +
␊ +
␊ + pwd␊ + /usr/home/chris/bin␊ + ls -la␊ + total 2␊ + drwxr-xr-x 2 chris chris 11 Jan 10 16:48 .␊ + drwxr--r-x 45 chris chris 92 Feb 14 11:10 ..␊ + -rwxr-xr-x 1 chris chris 444 Aug 25 2013 backup␊ + -rwxr-xr-x 1 chris chris 642 Jan 17 14:42 deploy␊ + ␊ +
␊ +
␊ + div {␊ + border: 40px solid transparent;␊ + border-image: 33.334%␊ + padding: 1em;␊ + max-width: 20em;␊ + font: 130%/1.6 Baskerville, Palatino, serif;␊ + border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6 c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7 c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7 C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6 c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');␊ + }␊ + ␊ +
␊ +
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ +
␊ + span.foo {␊ + background-color: navy;␊ + color: #bfd;␊ + }␊ + ␊ + span.bar {␊ + background: rgba(105, 0, 12, 0.38);␊ + color: hsl(30, 100%, 50%);␊ + border-color: transparent;␊ + }␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ + file.html␊ +
␊ +
␊ + export default () => {␊ + // register current used theme␊ + const [theme, setTheme] = React.useState(themes.light);␊ + ␊ + // handle the radio changes␊ + const handleChange = ({ target }) => {␊ + // based on the radio value, toggle to the correct theme␊ + return setTheme(themes[target.value]);␊ + };␊ + ␊ + return (␊ + <ThemeProvider value={theme}>␊ + <Button>I am styled by theme context!</Button>␊ + <form onChange={handleChange}>␊ + <p>Please select your theme:</p>␊ + <input type="radio" id="light" name="theme" value="light" />␊ + <label for="light">Light</label>␊ + <input type="radio" id="dark" name="theme" value="dark" />␊ + <label for="dark">Dark</label>␊ + </form>␊ + </ThemeProvider>␊ + );␊ + };␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ +
hello␊
+    world
␊ +
␊ +
␊ + .␊ + ├── .eslintignore␊ + ├── .eslintrc␊ + ├── .gitignore␊ + ├── .prettierignore␊ + ├── .prettierrc␊ + ├── .yarnrc.yml␊ + ├── README.md␊ + ├── index.js␊ + ├── package.json␊ + ├── test␊ + ├── fixtures␊ + └── index.js␊ + └── yarn.lock␊ + ␊ + 7 directories, 41 files␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `

hello from remark-prism

␊ +

welcome all.

␊ +
␊ + [Text you want to see](http://url-goes-here.com)␊ + ␊ +
␊ +
␊ + pwd␊ + /usr/home/chris/bin␊ + ls -la␊ + total 2␊ + drwxr-xr-x 2 chris chris 11 Jan 10 16:48 .␊ + drwxr--r-x 45 chris chris 92 Feb 14 11:10 ..␊ + -rwxr-xr-x 1 chris chris 444 Aug 25 2013 backup␊ + -rwxr-xr-x 1 chris chris 642 Jan 17 14:42 deploy␊ + ␊ +
␊ +
␊ + div {␊ + border: 40px solid transparent;␊ + border-image: 33.334%␊ + padding: 1em;␊ + max-width: 20em;␊ + font: 130%/1.6 Baskerville, Palatino, serif;␊ + border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6 c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7 c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7 C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6 c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');␊ + }␊ + ␊ +
␊ +
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ +
␊ + span.foo {␊ + background-color: navy;␊ + color: #bfd;␊ + }␊ + ␊ + span.bar {␊ + background: rgba(105, 0, 12, 0.38);␊ + color: hsl(30, 100%, 50%);␊ + border-color: transparent;␊ + }␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ + file.html␊ +
␊ +
␊ + export default () => {␊ + // register current used theme␊ + const [theme, setTheme] = React.useState(themes.light);␊ + ␊ + // handle the radio changes␊ + const handleChange = ({ target }) => {␊ + // based on the radio value, toggle to the correct theme␊ + return setTheme(themes[target.value]);␊ + };␊ + ␊ + return (␊ + <ThemeProvider value={theme}>␊ + <Button>I am styled by theme context!</Button>␊ + <form onChange={handleChange}>␊ + <p>Please select your theme:</p>␊ + <input type="radio" id="light" name="theme" value="light" />␊ + <label for="light">Light</label>␊ + <input type="radio" id="dark" name="theme" value="dark" />␊ + <label for="dark">Dark</label>␊ + </form>␊ + </ThemeProvider>␊ + );␊ + };␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + hello␊ + world␊ +
␊ +
␊ + .␊ + ├── .eslintignore␊ + ├── .eslintrc␊ + ├── .gitignore␊ + ├── .prettierignore␊ + ├── .prettierrc␊ + ├── .yarnrc.yml␊ + ├── README.md␊ + ├── index.js␊ + ├── package.json␊ + ├── test␊ + ├── fixtures␊ + └── index.js␊ + └── yarn.lock␊ + ␊ + 7 directories, 41 files␊ + ␊ +
␊ + ` + +## autolinker + +> Snapshot 4 + + `␊ +
␊ + /**␊ + * Prism: Lightweight, robust, elegant syntax highlighting␊ + * MIT license http://www.opensource.org/licenses/mit-license.php/␊ + * @author Lea Verou http://lea.verou.me␊ + * Reach Lea at fake@email.com (no, not really)␊ + * And this is a Markdown link. Sweet, huh?␊ + */␊ + var foo = 5;␊ + // And a single line comment http://google.com␊ + ␊ +
␊ +
␊ + @font-face {␊ + src: url(http://lea.verou.me/logo.otf);␊ + font-family: 'LeaVerou';␊ + }␊ + ␊ +
␊ +
␊ + <!-- 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>␊ + ␊ +
␊ +
␊ + [Text you want to see](http://url-goes-here.com)␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + /**␊ + * Prism: Lightweight, robust, elegant syntax highlighting␊ + * MIT license http://www.opensource.org/licenses/mit-license.php/␊ + * @author Lea Verou http://lea.verou.me␊ + * Reach Lea at fake@email.com (no, not really)␊ + * And this is a Markdown link. Sweet, huh?␊ + */␊ + var foo = 5;␊ + // And a single line comment http://google.com␊ + ␊ +
␊ +
␊ + @font-face {␊ + src: url(http://lea.verou.me/logo.otf);␊ + font-family: 'LeaVerou';␊ + }␊ + ␊ +
␊ +
␊ + <!-- 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>␊ + ␊ +
␊ +
␊ + [Text you want to see](http://url-goes-here.com)␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + /**␊ + * Prism: Lightweight, robust, elegant syntax highlighting␊ + * MIT license http://www.opensource.org/licenses/mit-license.php/␊ + * @author Lea Verou http://lea.verou.me␊ + * Reach Lea at fake@email.com (no, not really)␊ + * And this is a Markdown link. Sweet, huh?␊ + */␊ + var foo = 5;␊ + // And a single line comment http://google.com␊ + ␊ +
␊ +
␊ + @font-face {␊ + src: url(http://lea.verou.me/logo.otf);␊ + font-family: 'LeaVerou';␊ + }␊ + ␊ +
␊ +
␊ + <!-- 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>␊ + ␊ +
␊ +
␊ + [Text you want to see](http://url-goes-here.com)␊ + ␊ +
␊ + ` + +## command-line + +> Snapshot 4 + + `␊ +
␊ + pwd␊ + /usr/home/chris/bin␊ + ls -la␊ + total 2␊ + drwxr-xr-x 2 chris chris 11 Jan 10 16:48 .␊ + drwxr--r-x 45 chris chris 92 Feb 14 11:10 ..␊ + -rwxr-xr-x 1 chris chris 444 Aug 25 2013 backup␊ + -rwxr-xr-x 1 chris chris 642 Jan 17 14:42 deploy␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + pwd␊ + /usr/home/chris/bin␊ + ls -la␊ + total 2␊ + drwxr-xr-x 2 chris chris 11 Jan 10 16:48 .␊ + drwxr--r-x 45 chris chris 92 Feb 14 11:10 ..␊ + -rwxr-xr-x 1 chris chris 444 Aug 25 2013 backup␊ + -rwxr-xr-x 1 chris chris 642 Jan 17 14:42 deploy␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + pwd␊ + /usr/home/chris/bin␊ + ls -la␊ + total 2␊ + drwxr-xr-x 2 chris chris 11 Jan 10 16:48 .␊ + drwxr--r-x 45 chris chris 92 Feb 14 11:10 ..␊ + -rwxr-xr-x 1 chris chris 444 Aug 25 2013 backup␊ + -rwxr-xr-x 1 chris chris 642 Jan 17 14:42 deploy␊ + ␊ +
␊ + ` + +## data-uri-highlight + +> Snapshot 4 + + `␊ +
␊ + div {␊ + border: 40px solid transparent;␊ + border-image: 33.334%␊ + padding: 1em;␊ + max-width: 20em;␊ + font: 130%/1.6 Baskerville, Palatino, serif;␊ + border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6 c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7 c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7 C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6 c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');␊ + }␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + div {␊ + border: 40px solid transparent;␊ + border-image: 33.334%␊ + padding: 1em;␊ + max-width: 20em;␊ + font: 130%/1.6 Baskerville, Palatino, serif;␊ + border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6 c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7 c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7 C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6 c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');␊ + }␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + div {␊ + border: 40px solid transparent;␊ + border-image: 33.334%␊ + padding: 1em;␊ + max-width: 20em;␊ + font: 130%/1.6 Baskerville, Palatino, serif;␊ + border-image: 33.334% url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" height="100px" width="100px"><g><path d="M28.1,36.6c4.6,1.9,12.2,1.6,20.9,1.1c8.9-0.4,19-0.9,28.9,0.9c6.3,1.2,11.9,3.1,16.8,6c-1.5-12.2-7.9-23.7-18.6-31.3 c-4.9-0.2-9.9,0.3-14.8,1.4C47.8,17.9,36.2,25.6,28.1,36.6z"/><path d="M70.3,9.8C57.5,3.4,42.8,3.6,30.5,9.5c-3,6-8.4,19.6-5.3,24.9c8.6-11.7,20.9-19.8,35.2-23.1C63.7,10.5,67,10,70.3,9.8z"/><path d="M16.5,51.3c0.6-1.7,1.2-3.4,2-5.1c-3.8-3.4-7.5-7-11-10.8c-2.1,6.1-2.8,12.5-2.3,18.7C9.6,51.1,13.4,50.2,16.5,51.3z"/><path d="M9,31.6c3.5,3.9,7.2,7.6,11.1,11.1c0.8-1.6,1.7-3.1,2.6-4.6c0.1-0.2,0.3-0.4,0.4-0.6c-2.9-3.3-3.1-9.2-0.6-17.6 c0.8-2.7,1.8-5.3,2.7-7.4c-5.2,3.4-9.8,8-13.3,13.7C10.8,27.9,9.8,29.7,9,31.6z"/><path d="M15.4,54.7c-2.6-1-6.1,0.7-9.7,3.4c1.2,6.6,3.9,13,8,18.5C13,69.3,13.5,61.8,15.4,54.7z"/><path d="M39.8,57.6C54.3,66.7,70,73,86.5,76.4c0.6-0.8,1.1-1.6,1.7-2.5c4.8-7.7,7-16.3,6.8-24.8c-13.8-9.3-31.3-8.4-45.8-7.7 c-9.5,0.5-17.8,0.9-23.2-1.7c-0.1,0.1-0.2,0.3-0.3,0.4c-1,1.7-2,3.4-2.9,5.1C28.2,49.7,33.8,53.9,39.8,57.6z"/><path d="M26.2,88.2c3.3,2,6.7,3.6,10.2,4.7c-3.5-6.2-6.3-12.6-8.8-18.5c-3.1-7.2-5.8-13.5-9-17.2c-1.9,8-2,16.4-0.3,24.7 C20.6,84.2,23.2,86.3,26.2,88.2z"/><path d="M30.9,73c2.9,6.8,6.1,14.4,10.5,21.2c15.6,3,32-2.3,42.6-14.6C67.7,76,52.2,69.6,37.9,60.7C32,57,26.5,53,21.3,48.6 c-0.6,1.5-1.2,3-1.7,4.6C24.1,57.1,27.3,64.5,30.9,73z"/></g></svg>');␊ + }␊ + ␊ +
␊ + ` + +## diff-highlight + +> Snapshot 4 + + `␊ +
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ +
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ +
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ +
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ +
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ +
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ +
␊ + @@ -4,6 +4,5 @@␊ + - let foo = bar.baz([1, 2, 3]);␊ + - foo = foo + 1;␊ + + const foo = bar.baz([1, 2, 3]) + 1;␊ + console.log(\`foo: ${foo}\`);␊ + ␊ +
␊ + ` + +## inline-color + +> Snapshot 4 + + `␊ +
␊ + span.foo {␊ + background-color: navy;␊ + color: #bfd;␊ + }␊ + ␊ + span.bar {␊ + background: rgba(105, 0, 12, 0.38);␊ + color: hsl(30, 100%, 50%);␊ + border-color: transparent;␊ + }␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="utf-8" />␊ + <title>Example</title>␊ + <style>␊ + a.not-a-class {␊ + color: red;␊ + }␊ + </style>␊ + </head>␊ + <body style="color:black"></body>␊ + </html>␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + span.foo {␊ + background-color: navy;␊ + color: #bfd;␊ + }␊ + ␊ + span.bar {␊ + background: rgba(105, 0, 12, 0.38);␊ + color: hsl(30, 100%, 50%);␊ + border-color: transparent;␊ + }␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="utf-8" />␊ + <title>Example</title>␊ + <style>␊ + a.not-a-class {␊ + color: red;␊ + }␊ + </style>␊ + </head>␊ + <body style="color:black"></body>␊ + </html>␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + span.foo {␊ + background-color: navy;␊ + color: #bfd;␊ + }␊ + ␊ + span.bar {␊ + background: rgba(105, 0, 12, 0.38);␊ + color: hsl(30, 100%, 50%);␊ + border-color: transparent;␊ + }␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="utf-8" />␊ + <title>Example</title>␊ + <style>␊ + a.not-a-class {␊ + color: red;␊ + }␊ + </style>␊ + </head>␊ + <body style="color:black"></body>␊ + </html>␊ + ␊ +
␊ + ` + +## keep-markup + +> Snapshot 4 + + `␊ +
␊ + x<span>a</span>y␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + x<span>a</span>y␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + x<span>a</span>y␊ + ␊ +
␊ + ` + +## languages + +> Snapshot 4 + + `␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <?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">␊ + <title>Hello World</title>␊ + <g>␊ + <text x="10" y="50">Hello World</text>␊ + <animate attributeName="opacity" values="0;1" dur="4s" fill="freeze" begin="0s"/>␊ + </g>␊ + </svg>␊ + ␊ +
␊ +
␊ + body::before {␊ + content: 'Hello World';␊ + }␊ + ␊ +
␊ +
␊ + console.log('Hello World');␊ + ␊ +
␊ +
␊ + class HelloMessage extends React.Component {␊ + render() {␊ + return <div>Hello {this.props.name}</div>;␊ + }␊ + }␊ + ␊ + ReactDOM.render(␊ + <HelloMessage name="Taylor" />,␊ + document.getElementById('hello-example'),␊ + );␊ + ␊ +
␊ +
␊ + REPORT ZHELLO_WORLD.␊ + ␊ + START-OF-SELECTION.␊ + WRITE: 'Hello World'.␊ + ␊ +
␊ +
␊ + package␊ + {␊ + import flash.display.Sprite;␊ + import flash.text.TextField;␊ + ␊ + public class actionscript extends Sprite␊ + {␊ + private var hello:TextField = new TextField();␊ + ␊ + public function actionscript(){␊ + hello.text = "Hello World";␊ + addChild(hello);␊ + }␊ + }␊ + }␊ + ␊ +
␊ +
␊ + with Text_IO;␊ + procedure Hello_World is␊ + begin␊ + Text_IO.Put_line("Hello World");␊ + end Hello_World;␊ + ␊ +
␊ +
␊ + 'Hello World'␊ + ␊ +
␊ +
␊ + display dialog "Hello World"␊ + ␊ +
␊ +
␊ + void setup() {␊ + Serial.begin(9600);␊ + Serial.println("Hello World");␊ + }␊ + ␊ + void loop() {␊ + ␊ + }␊ + ␊ +
␊ +
␊ + MsgBox, Hello World␊ + ␊ +
␊ +
␊ + MsgBox(0, "Message Box", "Hello World")␊ + ␊ +
␊ +
␊ + #!/bin/bash␊ + ␊ + echo Hello World␊ + ␊ +
␊ +
␊ + #!/bin/sh␊ + echo "Hello World"␊ + ␊ +
␊ +
␊ + 10 PRINT "Hello World"␊ + 20 END␊ + ␊ +
␊ +
␊ + @echo off␊ + echo Hello World␊ + ␊ +
␊ +
␊ + -[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------.␊ + ␊ +
␊ +
␊ + #include <stdio.h>␊ + ␊ + int main() {␊ + printf("Hello World\\n");␊ + return 0;␊ + }␊ + ␊ +
␊ +
␊ + class HelloWorld {␊ + static void Main() {␊ + System.Console.WriteLine("Hello World");␊ + }␊ + }␊ + ␊ +
␊ +
␊ + #include <iostream>␊ + ␊ + using namespace std;␊ + ␊ + int main()␊ + {␊ + cout << "Hello World\\n";␊ + }␊ + ␊ +
␊ +
␊ + // ilasm cil.il␊ + .assembly HelloWorld {}␊ + .method public static void Main() cil managed␊ + {␊ + .entrypoint␊ + .maxstack 1␊ + ldstr "Hello World"␊ + call void [mscorlib]System.Console::WriteLine(string)␊ + ret␊ + }␊ + ␊ +
␊ +
␊ + alert "Hello World"␊ + ␊ +
␊ +
␊ + (println "Hello World")␊ + ␊ +
␊ +
␊ + puts "Hello World"␊ + ␊ +
␊ +
␊ + // Hello World in D␊ + import std.stdio;␊ + ␊ + void main()␊ + {␊ + writeln("Hello World");␊ + }␊ + ␊ +
␊ +
␊ + main() {␊ + print('Hello World');␊ + }␊ + ␊ +
␊ +
␊ + indexing "Hello World in Eiffel , from http://roesler-ac.de/wolfram/hello.htm#Eiffel"␊ + ␊ + class HELLO␊ + ␊ + creation␊ + run␊ + ␊ + feature␊ + ␊ + run is␊ + local␊ + io : BASIC_IO;␊ + do␊ + !!io;␊ + io.put_string("Hello World");␊ + io.put_newline␊ + end; -- run␊ + end; -- class HELLO␊ + ␊ +
␊ +
␊ + IO.puts "Defining the function world"␊ + ␊ +
␊ +
␊ + import Html exposing (text)␊ + ␊ + main =␊ + text "Hello World"␊ + ␊ +
␊ +
␊ + -module(erlang_hw).␊ + -export([start/0]).␊ + ␊ + start() ->␊ + io:format("Hello World~n").␊ + ␊ +
␊ +
␊ + printfn "Hello World"␊ + ␊ +
␊ +
␊ + USING: io ;␊ + "Hello World" print␊ + ␊ +
␊ +
␊ + program helloworld␊ + print *,'Hello World'␊ + end program helloworld␊ + ␊ +
␊ +
␊ + extends Label␊ + ␊ + func _ready():␊ + self.text = "Hello World"␊ + ␊ +
␊ +
␊ + draw_text(1, 1, "Hello World");␊ + ␊ +
␊ +
␊ + package main␊ + ␊ + import "fmt"␊ + ␊ + func main() {␊ + fmt.Println("Hello World")␊ + }␊ + ␊ +
␊ +
␊ + {␊ + "Hello World"␊ + }␊ + ␊ +
␊ +
␊ + println "Hello World"␊ + ␊ +
␊ +
␊ + %html␊ + %title Hello World␊ + %body␊ + %h1 Hello World␊ + ␊ +
␊ +
␊ + module Main where␊ + ␊ + main = putStrLn "Hello World"␊ + ␊ +
␊ +
␊ + class HelloWorld {␊ + static function main() {␊ + trace("Hello World");␊ + }␊ + }␊ + ␊ +
␊ +
␊ + procedure main()␊ + write("Hello World");␊ + end␊ + ␊ +
␊ +
␊ + "Hello World\\n" print␊ + ␊ +
␊ +
␊ + #!/opt/local/bin/jc␊ + echo 'Hello World'␊ + exit ''␊ + ␊ +
␊ +
␊ + public class Java {␊ + public static void main(String[] args) {␊ + System.out.println("Hello World");␊ + }␊ + }␊ + ␊ +
␊ +
␊ + { "hello": "world" }␊ + ␊ +
␊ +
␊ + println("Hello World")␊ + ␊ +
␊ +
␊ + package hello␊ + ␊ + fun main() {␊ + println("Hello World")␊ + }␊ + ␊ +
␊ +
␊ + \\documentclass{article}␊ + \\begin{document}␊ + Hello World␊ + \\end{document}␊ + ␊ +
␊ +
␊ + body::before {␊ + content: 'Hello World!';␊ + }␊ + ␊ +
␊ +
␊ + ; LISP␊ + (DEFUN hello ()␊ + (PRINT (LIST 'HELLO 'WORLD))␊ + )␊ + ␊ + (hello)␊ + ␊ +
␊ +
␊ + ;;for emacs elisp␊ + ␊ + (message "hello,world")␊ + ␊ +
␊ +
␊ + console.log "Hello World"␊ + ␊ +
␊ +
␊ + ; llvm-as llvm.ll␊ + ; x86 assembly: llc llvm.bc -o llvm.s -march x86␊ + ; interpreter: lli llvm.bc␊ + ␊ + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"␊ + @.str = internal constant [12 x i8] c"Hello World\\00"␊ + ␊ + ; puts from libc␊ + declare i32 @puts(i8*)␊ + ␊ + define i32 @main(...) {␊ + call i32 @puts(i8* getelementptr([12 x i8]* @.str, i32 0, i32 0))␊ + ret i32 0␊ + }␊ + ␊ +
␊ +
␊ + HAI␊ + CAN HAS STDIO?␊ + VISIBLE "Hello World"␊ + KTHXBYE␊ + ␊ +
␊ +
␊ + print("Hello World")␊ + ␊ +
␊ +
␊ + # Hello World␊ + ␊ +
␊ +
␊ + disp('Hello World')␊ + ␊ +
␊ +
␊ + proc helloWorld () {␊ + print "Hello World\\n";␊ + }␊ + helloWorld;␊ + ␊ +
␊ +
␊ + print 'Hello World'␊ + ␊ +
␊ +
␊ + section .text␊ + global _start ;must be declared for linker (ld)␊ + ␊ + _start: ;tell linker entry point␊ + ␊ + xor ebx,ebx ;ebx=0␊ + mov ecx,msg ;address of message to write␊ + lea edx,[ebx+len] ;message length␊ + lea eax,[ebx+4] ;system call number (sys_write)␊ + inc ebx ;file descriptor (stdout)␊ + int 0x80 ;call kernel␊ + ␊ + xor eax, eax ;set eax=0␊ + inc eax ;system call number (sys_exit)␊ + int 0x80 ;call kernel␊ + ␊ + section .rodata␊ + ␊ + msg db 'Hello, world!',0xa ;our string␊ + len equ $ - msg ;length of our string␊ + ␊ +
␊ +
␊ + echo("Hello World")␊ + ␊ +
␊ +
␊ + /*␊ + Build on OS X:␊ + clang -framework Foundation -fobjc-arc objc.m -o objc␊ + ␊ + Build on Linux with GNUstep:␊ + clang \`gnustep-config --objc-flags\` \`gnustep-config --base-libs\` -fobjc-nonfragile-abi -fobjc-arc objc.m -o objc␊ + */␊ + ␊ + #import <Foundation/Foundation.h>␊ + ␊ + int main(void)␊ + {␊ + NSLog(@"Hello World");␊ + }␊ + ␊ +
␊ +
␊ + print_string "Hello World\\n"␊ + ␊ +
␊ +
␊ + {Show 'Hello World'}␊ + ␊ +
␊ +
␊ + @main[]␊ + ^rem{Will print "Hello World" when run as CGI script}␊ + $hello[Hello World]␊ + $result[$hello]␊ + ␊ +
␊ +
␊ + program HelloWorld(output);␊ + begin␊ + writeln('Hello World');␊ + end.␊ + ␊ +
␊ +
␊ + program ObjectPascalExample;␊ + ␊ + type␊ + THelloWorld = class␊ + procedure Put;␊ + end;␊ + ␊ + procedure THelloWorld.Put;␊ + begin␊ + Writeln('Hello World');␊ + end;␊ + ␊ + var␊ + HelloWorld: THelloWorld;␊ + ␊ + begin␊ + HelloWorld := THelloWorld.Create;␊ + HelloWorld.Put;␊ + HelloWorld.Free;␊ + end.␊ + ␊ +
␊ +
␊ + #!/usr/local/bin/perl -w␊ + use CGI; # load CGI routines␊ + $q = CGI->new; # create new CGI object␊ + print $q->header, # create the HTTP header␊ + $q->start_html('Hello World'), # start the HTML␊ + $q->h1('Hello World'), # level 1 header␊ + $q->end_html; # end the HTML␊ + ␊ + # http://perldoc.perl.org/CGI.html␊ + ␊ +
␊ +
␊ + <?php␊ + ␊ + echo 'Hello World';␊ + ␊ +
␊ +
␊ + begin␊ + dbms_output.put_line('Hello World');␊ + end;␊ + /␊ + ␊ +
␊ +
␊ + 'Hello World'␊ + ␊ +
␊ +
␊ + size(128, 128);␊ + background(0);␊ + textAlign(CENTER, CENTER);␊ + fill(255);␊ + text("Hello World", width / 2, height / 2);␊ + ␊ +
␊ +
␊ + helloWorld :-␊ + write('Hello World').␊ + ␊ + :- helloWorld.␊ + ␊ +
␊ +
␊ + doctype html␊ + html␊ + head␊ + title Hello World␊ + body␊ + h1 Hello World␊ + ␊ +
␊ +
␊ +
module Main where␊
+    ␊
+    import Debug.Trace␊
+    ␊
+    main = trace "Hello World"␊
+    
␊ +
␊ +
␊ + If OpenConsole()␊ + PrintN("Hello World")␊ + EndIf␊ + ␊ +
␊ +
␊ + #!/usr/bin/env python␊ + print "Hello World"␊ + ␊ +
␊ +
␊ + "Hello World"␊ + ␊ +
␊ +
␊ + #!/usr/bin/env qore␊ + %exec-class HelloWorld␊ + class HelloWorld␊ + {␊ + constructor()␊ + {␊ + background $.say("Hello World");␊ + }␊ + private say($arg)␊ + {␊ + printf("%s\\n", $arg);␊ + }␊ + }␊ + ␊ +
␊ +
␊ + cat("Hello World\\n")␊ + ␊ +
␊ +
␊ + #lang racket␊ + "Hello World"␊ + ␊ +
␊ +
␊ + print_string "Hello World"␊ + ␊ +
␊ +
␊ + #!/usr/bin/env ruby␊ + puts "Hello World"␊ + ␊ +
␊ +
␊ + fn main() {␊ + println!("Hello World");␊ + }␊ + ␊ +
␊ +
␊ + %macro putit( string= );␊ + %put &string;␊ + %mend;␊ + ␊ + %putit(string=Hello World)␊ + ␊ +
␊ +
␊ + body::before␊ + content: "Hello World"␊ + ␊ +
␊ +
␊ + object HelloWorld extends App {␊ + println("Hello World")␊ + }␊ + ␊ +
␊ +
␊ + (display "Hello World") (newline)␊ + ␊ +
␊ +
␊ + #!/bin/sh␊ + echo "Hello World"␊ + ␊ +
␊ +
␊ + Transcript show: 'Hello World'.␊ + ␊ +
␊ +
␊ + pragma solidity ^0.6.4;␊ + ␊ + contract HelloWorld {␊ + function render () public pure returns (string memory) {␊ + return 'Hello World';␊ + }␊ + }␊ + ␊ +
␊ +
␊ + SELECT ?h WHERE {␊ + VALUES ?h { "Hello World" }␊ + }␊ + ␊ +
␊ +
␊ + SELECT 'Hello World';␊ + ␊ +
␊ +
␊ + body::before␊ + content: "Hello World"␊ + ␊ +
␊ +
␊ + print("Hello World")␊ + ␊ +
␊ +
␊ + puts "Hello World"␊ + ␊ +
␊ +
␊ + console.log('Hello World');␊ + ␊ +
␊ +
␊ + static void main (string[] args)␊ + {␊ + stdout.printf ("Hello World\\n");␊ + }␊ + ␊ + ␊ +
␊ +
␊ + Module HelloWorld␊ + Sub Main()␊ + System.Console.WriteLine("Hello World")␊ + End Sub␊ + End Module␊ + ␊ +
␊ +
␊ + module main;␊ + initial␊ + begin␊ + $display("Hello World");␊ + $finish;␊ + end␊ + endmodule␊ + ␊ +
␊ +
␊ + use std.textio.all;␊ + ␊ + entity hello_world is␊ + end hello_world;␊ + ␊ + architecture behaviour of hello_world is␊ + begin␊ + process␊ + begin␊ + write (output, String'("Hello World"));␊ + wait;␊ + end process;␊ + end behaviour;␊ + ␊ +
␊ +
␊ + echo "Hello World"␊ + ␊ +
␊ +
␊ + Module HelloWorld␊ + Sub Main()␊ + MsgBox("Hello World")␊ + End Sub␊ + End Module␊ + ␊ +
␊ +
␊ +
Hello World␊
+    
␊ +
␊ +
␊ + let $hello := "Hello World"␊ + return $hello␊ + ␊ +
␊ +
␊ + hello: world␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <?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">␊ + <title>Hello World</title>␊ + <g>␊ + <text x="10" y="50">Hello World</text>␊ + <animate attributeName="opacity" values="0;1" dur="4s" fill="freeze" begin="0s"/>␊ + </g>␊ + </svg>␊ + ␊ +
␊ +
␊ + body::before {␊ + content: 'Hello World';␊ + }␊ + ␊ +
␊ +
␊ + console.log('Hello World');␊ + ␊ +
␊ +
␊ + class HelloMessage extends React.Component {␊ + render() {␊ + return <div>Hello {this.props.name}</div>;␊ + }␊ + }␊ + ␊ + ReactDOM.render(␊ + <HelloMessage name="Taylor" />,␊ + document.getElementById('hello-example'),␊ + );␊ + ␊ +
␊ +
␊ + REPORT ZHELLO_WORLD.␊ + ␊ + START-OF-SELECTION.␊ + WRITE: 'Hello World'.␊ + ␊ +
␊ +
␊ + package␊ + {␊ + import flash.display.Sprite;␊ + import flash.text.TextField;␊ + ␊ + public class actionscript extends Sprite␊ + {␊ + private var hello:TextField = new TextField();␊ + ␊ + public function actionscript(){␊ + hello.text = "Hello World";␊ + addChild(hello);␊ + }␊ + }␊ + }␊ + ␊ +
␊ +
␊ + with Text_IO;␊ + procedure Hello_World is␊ + begin␊ + Text_IO.Put_line("Hello World");␊ + end Hello_World;␊ + ␊ +
␊ +
␊ + 'Hello World'␊ + ␊ +
␊ +
␊ + display dialog "Hello World"␊ + ␊ +
␊ +
␊ + void setup() {␊ + Serial.begin(9600);␊ + Serial.println("Hello World");␊ + }␊ + ␊ + void loop() {␊ + ␊ + }␊ + ␊ +
␊ +
␊ + MsgBox, Hello World␊ + ␊ +
␊ +
␊ + MsgBox(0, "Message Box", "Hello World")␊ + ␊ +
␊ +
␊ + #!/bin/bash␊ + ␊ + echo Hello World␊ + ␊ +
␊ +
␊ + #!/bin/sh␊ + echo "Hello World"␊ + ␊ +
␊ +
␊ + 10 PRINT "Hello World"␊ + 20 END␊ + ␊ +
␊ +
␊ + @echo off␊ + echo Hello World␊ + ␊ +
␊ +
␊ + -[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------.␊ + ␊ +
␊ +
␊ + #include <stdio.h>␊ + ␊ + int main() {␊ + printf("Hello World\\n");␊ + return 0;␊ + }␊ + ␊ +
␊ +
␊ + class HelloWorld {␊ + static void Main() {␊ + System.Console.WriteLine("Hello World");␊ + }␊ + }␊ + ␊ +
␊ +
␊ + #include <iostream>␊ + ␊ + using namespace std;␊ + ␊ + int main()␊ + {␊ + cout << "Hello World\\n";␊ + }␊ + ␊ +
␊ +
␊ + // ilasm cil.il␊ + .assembly HelloWorld {}␊ + .method public static void Main() cil managed␊ + {␊ + .entrypoint␊ + .maxstack 1␊ + ldstr "Hello World"␊ + call void [mscorlib]System.Console::WriteLine(string)␊ + ret␊ + }␊ + ␊ +
␊ +
␊ + alert "Hello World"␊ + ␊ +
␊ +
␊ + (println "Hello World")␊ + ␊ +
␊ +
␊ + puts "Hello World"␊ + ␊ +
␊ +
␊ + // Hello World in D␊ + import std.stdio;␊ + ␊ + void main()␊ + {␊ + writeln("Hello World");␊ + }␊ + ␊ +
␊ +
␊ + main() {␊ + print('Hello World');␊ + }␊ + ␊ +
␊ +
␊ + indexing "Hello World in Eiffel , from http://roesler-ac.de/wolfram/hello.htm#Eiffel"␊ + ␊ + class HELLO␊ + ␊ + creation␊ + run␊ + ␊ + feature␊ + ␊ + run is␊ + local␊ + io : BASIC_IO;␊ + do␊ + !!io;␊ + io.put_string("Hello World");␊ + io.put_newline␊ + end; -- run␊ + end; -- class HELLO␊ + ␊ +
␊ +
␊ + IO.puts "Defining the function world"␊ + ␊ +
␊ +
␊ + import Html exposing (text)␊ + ␊ + main =␊ + text "Hello World"␊ + ␊ +
␊ +
␊ + -module(erlang_hw).␊ + -export([start/0]).␊ + ␊ + start() ->␊ + io:format("Hello World~n").␊ + ␊ +
␊ +
␊ + printfn "Hello World"␊ + ␊ +
␊ +
␊ + USING: io ;␊ + "Hello World" print␊ + ␊ +
␊ +
␊ + program helloworld␊ + print *,'Hello World'␊ + end program helloworld␊ + ␊ +
␊ +
␊ + extends Label␊ + ␊ + func _ready():␊ + self.text = "Hello World"␊ + ␊ +
␊ +
␊ + draw_text(1, 1, "Hello World");␊ + ␊ +
␊ +
␊ + package main␊ + ␊ + import "fmt"␊ + ␊ + func main() {␊ + fmt.Println("Hello World")␊ + }␊ + ␊ +
␊ +
␊ + {␊ + "Hello World"␊ + }␊ + ␊ +
␊ +
␊ + println "Hello World"␊ + ␊ +
␊ +
␊ + %html␊ + %title Hello World␊ + %body␊ + %h1 Hello World␊ + ␊ +
␊ +
␊ + module Main where␊ + ␊ + main = putStrLn "Hello World"␊ + ␊ +
␊ +
␊ + class HelloWorld {␊ + static function main() {␊ + trace("Hello World");␊ + }␊ + }␊ + ␊ +
␊ +
␊ + procedure main()␊ + write("Hello World");␊ + end␊ + ␊ +
␊ +
␊ + "Hello World\\n" print␊ + ␊ +
␊ +
␊ + #!/opt/local/bin/jc␊ + echo 'Hello World'␊ + exit ''␊ + ␊ +
␊ +
␊ + public class Java {␊ + public static void main(String[] args) {␊ + System.out.println("Hello World");␊ + }␊ + }␊ + ␊ +
␊ +
␊ + { "hello": "world" }␊ + ␊ +
␊ +
␊ + println("Hello World")␊ + ␊ +
␊ +
␊ + package hello␊ + ␊ + fun main() {␊ + println("Hello World")␊ + }␊ + ␊ +
␊ +
␊ + \\documentclass{article}␊ + \\begin{document}␊ + Hello World␊ + \\end{document}␊ + ␊ +
␊ +
␊ + body::before {␊ + content: 'Hello World!';␊ + }␊ + ␊ +
␊ +
␊ + ; LISP␊ + (DEFUN hello ()␊ + (PRINT (LIST 'HELLO 'WORLD))␊ + )␊ + ␊ + (hello)␊ + ␊ +
␊ +
␊ + ;;for emacs elisp␊ + ␊ + (message "hello,world")␊ + ␊ +
␊ +
␊ + console.log "Hello World"␊ + ␊ +
␊ +
␊ + ; llvm-as llvm.ll␊ + ; x86 assembly: llc llvm.bc -o llvm.s -march x86␊ + ; interpreter: lli llvm.bc␊ + ␊ + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"␊ + @.str = internal constant [12 x i8] c"Hello World\\00"␊ + ␊ + ; puts from libc␊ + declare i32 @puts(i8*)␊ + ␊ + define i32 @main(...) {␊ + call i32 @puts(i8* getelementptr([12 x i8]* @.str, i32 0, i32 0))␊ + ret i32 0␊ + }␊ + ␊ +
␊ +
␊ + HAI␊ + CAN HAS STDIO?␊ + VISIBLE "Hello World"␊ + KTHXBYE␊ + ␊ +
␊ +
␊ + print("Hello World")␊ + ␊ +
␊ +
␊ + # Hello World␊ + ␊ +
␊ +
␊ + disp('Hello World')␊ + ␊ +
␊ +
␊ + proc helloWorld () {␊ + print "Hello World\\n";␊ + }␊ + helloWorld;␊ + ␊ +
␊ +
␊ + print 'Hello World'␊ + ␊ +
␊ +
␊ + section .text␊ + global _start ;must be declared for linker (ld)␊ + ␊ + _start: ;tell linker entry point␊ + ␊ + xor ebx,ebx ;ebx=0␊ + mov ecx,msg ;address of message to write␊ + lea edx,[ebx+len] ;message length␊ + lea eax,[ebx+4] ;system call number (sys_write)␊ + inc ebx ;file descriptor (stdout)␊ + int 0x80 ;call kernel␊ + ␊ + xor eax, eax ;set eax=0␊ + inc eax ;system call number (sys_exit)␊ + int 0x80 ;call kernel␊ + ␊ + section .rodata␊ + ␊ + msg db 'Hello, world!',0xa ;our string␊ + len equ $ - msg ;length of our string␊ + ␊ +
␊ +
␊ + echo("Hello World")␊ + ␊ +
␊ +
␊ + /*␊ + Build on OS X:␊ + clang -framework Foundation -fobjc-arc objc.m -o objc␊ + ␊ + Build on Linux with GNUstep:␊ + clang \`gnustep-config --objc-flags\` \`gnustep-config --base-libs\` -fobjc-nonfragile-abi -fobjc-arc objc.m -o objc␊ + */␊ + ␊ + #import <Foundation/Foundation.h>␊ + ␊ + int main(void)␊ + {␊ + NSLog(@"Hello World");␊ + }␊ + ␊ +
␊ +
␊ + print_string "Hello World\\n"␊ + ␊ +
␊ +
␊ + {Show 'Hello World'}␊ + ␊ +
␊ +
␊ + @main[]␊ + ^rem{Will print "Hello World" when run as CGI script}␊ + $hello[Hello World]␊ + $result[$hello]␊ + ␊ +
␊ +
␊ + program HelloWorld(output);␊ + begin␊ + writeln('Hello World');␊ + end.␊ + ␊ +
␊ +
␊ + program ObjectPascalExample;␊ + ␊ + type␊ + THelloWorld = class␊ + procedure Put;␊ + end;␊ + ␊ + procedure THelloWorld.Put;␊ + begin␊ + Writeln('Hello World');␊ + end;␊ + ␊ + var␊ + HelloWorld: THelloWorld;␊ + ␊ + begin␊ + HelloWorld := THelloWorld.Create;␊ + HelloWorld.Put;␊ + HelloWorld.Free;␊ + end.␊ + ␊ +
␊ +
␊ + #!/usr/local/bin/perl -w␊ + use CGI; # load CGI routines␊ + $q = CGI->new; # create new CGI object␊ + print $q->header, # create the HTTP header␊ + $q->start_html('Hello World'), # start the HTML␊ + $q->h1('Hello World'), # level 1 header␊ + $q->end_html; # end the HTML␊ + ␊ + # http://perldoc.perl.org/CGI.html␊ + ␊ +
␊ +
␊ + <?php␊ + ␊ + echo 'Hello World';␊ + ␊ +
␊ +
␊ + begin␊ + dbms_output.put_line('Hello World');␊ + end;␊ + /␊ + ␊ +
␊ +
␊ + 'Hello World'␊ + ␊ +
␊ +
␊ + size(128, 128);␊ + background(0);␊ + textAlign(CENTER, CENTER);␊ + fill(255);␊ + text("Hello World", width / 2, height / 2);␊ + ␊ +
␊ +
␊ + helloWorld :-␊ + write('Hello World').␊ + ␊ + :- helloWorld.␊ + ␊ +
␊ +
␊ + doctype html␊ + html␊ + head␊ + title Hello World␊ + body␊ + h1 Hello World␊ + ␊ +
␊ +
␊ +
module Main where␊
+    ␊
+    import Debug.Trace␊
+    ␊
+    main = trace "Hello World"␊
+    
␊ +
␊ +
␊ + If OpenConsole()␊ + PrintN("Hello World")␊ + EndIf␊ + ␊ +
␊ +
␊ + #!/usr/bin/env python␊ + print "Hello World"␊ + ␊ +
␊ +
␊ + "Hello World"␊ + ␊ +
␊ +
␊ + #!/usr/bin/env qore␊ + %exec-class HelloWorld␊ + class HelloWorld␊ + {␊ + constructor()␊ + {␊ + background $.say("Hello World");␊ + }␊ + private say($arg)␊ + {␊ + printf("%s\\n", $arg);␊ + }␊ + }␊ + ␊ +
␊ +
␊ + cat("Hello World\\n")␊ + ␊ +
␊ +
␊ + #lang racket␊ + "Hello World"␊ + ␊ +
␊ +
␊ + print_string "Hello World"␊ + ␊ +
␊ +
␊ + #!/usr/bin/env ruby␊ + puts "Hello World"␊ + ␊ +
␊ +
␊ + fn main() {␊ + println!("Hello World");␊ + }␊ + ␊ +
␊ +
␊ + %macro putit( string= );␊ + %put &string;␊ + %mend;␊ + ␊ + %putit(string=Hello World)␊ + ␊ +
␊ +
␊ + body::before␊ + content: "Hello World"␊ + ␊ +
␊ +
␊ + object HelloWorld extends App {␊ + println("Hello World")␊ + }␊ + ␊ +
␊ +
␊ + (display "Hello World") (newline)␊ + ␊ +
␊ +
␊ + #!/bin/sh␊ + echo "Hello World"␊ + ␊ +
␊ +
␊ + Transcript show: 'Hello World'.␊ + ␊ +
␊ +
␊ + pragma solidity ^0.6.4;␊ + ␊ + contract HelloWorld {␊ + function render () public pure returns (string memory) {␊ + return 'Hello World';␊ + }␊ + }␊ + ␊ +
␊ +
␊ + SELECT ?h WHERE {␊ + VALUES ?h { "Hello World" }␊ + }␊ + ␊ +
␊ +
␊ + SELECT 'Hello World';␊ + ␊ +
␊ +
␊ + body::before␊ + content: "Hello World"␊ + ␊ +
␊ +
␊ + print("Hello World")␊ + ␊ +
␊ +
␊ + puts "Hello World"␊ + ␊ +
␊ +
␊ + console.log('Hello World');␊ + ␊ +
␊ +
␊ + static void main (string[] args)␊ + {␊ + stdout.printf ("Hello World\\n");␊ + }␊ + ␊ + ␊ +
␊ +
␊ + Module HelloWorld␊ + Sub Main()␊ + System.Console.WriteLine("Hello World")␊ + End Sub␊ + End Module␊ + ␊ +
␊ +
␊ + module main;␊ + initial␊ + begin␊ + $display("Hello World");␊ + $finish;␊ + end␊ + endmodule␊ + ␊ +
␊ +
␊ + use std.textio.all;␊ + ␊ + entity hello_world is␊ + end hello_world;␊ + ␊ + architecture behaviour of hello_world is␊ + begin␊ + process␊ + begin␊ + write (output, String'("Hello World"));␊ + wait;␊ + end process;␊ + end behaviour;␊ + ␊ +
␊ +
␊ + echo "Hello World"␊ + ␊ +
␊ +
␊ + Module HelloWorld␊ + Sub Main()␊ + MsgBox("Hello World")␊ + End Sub␊ + End Module␊ + ␊ +
␊ +
␊ +
Hello World␊
+    
␊ +
␊ +
␊ + let $hello := "Hello World"␊ + return $hello␊ + ␊ +
␊ +
␊ + hello: world␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <?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">␊ + <title>Hello World</title>␊ + <g>␊ + <text x="10" y="50">Hello World</text>␊ + <animate attributeName="opacity" values="0;1" dur="4s" fill="freeze" begin="0s"/>␊ + </g>␊ + </svg>␊ + ␊ +
␊ +
␊ + body::before {␊ + content: 'Hello World';␊ + }␊ + ␊ +
␊ +
␊ + console.log('Hello World');␊ + ␊ +
␊ +
␊ + class HelloMessage extends React.Component {␊ + render() {␊ + return <div>Hello {this.props.name}</div>;␊ + }␊ + }␊ + ␊ + ReactDOM.render(␊ + <HelloMessage name="Taylor" />,␊ + document.getElementById('hello-example'),␊ + );␊ + ␊ +
␊ +
␊ + REPORT ZHELLO_WORLD.␊ + ␊ + START-OF-SELECTION.␊ + WRITE: 'Hello World'.␊ + ␊ +
␊ +
␊ + package␊ + {␊ + import flash.display.Sprite;␊ + import flash.text.TextField;␊ + ␊ + public class actionscript extends Sprite␊ + {␊ + private var hello:TextField = new TextField();␊ + ␊ + public function actionscript(){␊ + hello.text = "Hello World";␊ + addChild(hello);␊ + }␊ + }␊ + }␊ + ␊ +
␊ +
␊ + with Text_IO;␊ + procedure Hello_World is␊ + begin␊ + Text_IO.Put_line("Hello World");␊ + end Hello_World;␊ + ␊ +
␊ +
␊ + 'Hello World'␊ + ␊ +
␊ +
␊ + display dialog "Hello World"␊ + ␊ +
␊ +
␊ + void setup() {␊ + Serial.begin(9600);␊ + Serial.println("Hello World");␊ + }␊ + ␊ + void loop() {␊ + ␊ + }␊ + ␊ +
␊ +
␊ + MsgBox, Hello World␊ + ␊ +
␊ +
␊ + MsgBox(0, "Message Box", "Hello World")␊ + ␊ +
␊ +
␊ + #!/bin/bash␊ + ␊ + echo Hello World␊ + ␊ +
␊ +
␊ + #!/bin/sh␊ + echo "Hello World"␊ + ␊ +
␊ +
␊ + 10 PRINT "Hello World"␊ + 20 END␊ + ␊ +
␊ +
␊ + @echo off␊ + echo Hello World␊ + ␊ +
␊ +
␊ + -[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------.␊ + ␊ +
␊ +
␊ + #include <stdio.h>␊ + ␊ + int main() {␊ + printf("Hello World\\n");␊ + return 0;␊ + }␊ + ␊ +
␊ +
␊ + class HelloWorld {␊ + static void Main() {␊ + System.Console.WriteLine("Hello World");␊ + }␊ + }␊ + ␊ +
␊ +
␊ + #include <iostream>␊ + ␊ + using namespace std;␊ + ␊ + int main()␊ + {␊ + cout << "Hello World\\n";␊ + }␊ + ␊ +
␊ +
␊ + // ilasm cil.il␊ + .assembly HelloWorld {}␊ + .method public static void Main() cil managed␊ + {␊ + .entrypoint␊ + .maxstack 1␊ + ldstr "Hello World"␊ + call void [mscorlib]System.Console::WriteLine(string)␊ + ret␊ + }␊ + ␊ +
␊ +
␊ + alert "Hello World"␊ + ␊ +
␊ +
␊ + (println "Hello World")␊ + ␊ +
␊ +
␊ + puts "Hello World"␊ + ␊ +
␊ +
␊ + // Hello World in D␊ + import std.stdio;␊ + ␊ + void main()␊ + {␊ + writeln("Hello World");␊ + }␊ + ␊ +
␊ +
␊ + main() {␊ + print('Hello World');␊ + }␊ + ␊ +
␊ +
␊ + indexing "Hello World in Eiffel , from http://roesler-ac.de/wolfram/hello.htm#Eiffel"␊ + ␊ + class HELLO␊ + ␊ + creation␊ + run␊ + ␊ + feature␊ + ␊ + run is␊ + local␊ + io : BASIC_IO;␊ + do␊ + !!io;␊ + io.put_string("Hello World");␊ + io.put_newline␊ + end; -- run␊ + end; -- class HELLO␊ + ␊ +
␊ +
␊ + IO.puts "Defining the function world"␊ + ␊ +
␊ +
␊ + import Html exposing (text)␊ + ␊ + main =␊ + text "Hello World"␊ + ␊ +
␊ +
␊ + -module(erlang_hw).␊ + -export([start/0]).␊ + ␊ + start() ->␊ + io:format("Hello World~n").␊ + ␊ +
␊ +
␊ + printfn "Hello World"␊ + ␊ +
␊ +
␊ + USING: io ;␊ + "Hello World" print␊ + ␊ +
␊ +
␊ + program helloworld␊ + print *,'Hello World'␊ + end program helloworld␊ + ␊ +
␊ +
␊ + extends Label␊ + ␊ + func _ready():␊ + self.text = "Hello World"␊ + ␊ +
␊ +
␊ + draw_text(1, 1, "Hello World");␊ + ␊ +
␊ +
␊ + package main␊ + ␊ + import "fmt"␊ + ␊ + func main() {␊ + fmt.Println("Hello World")␊ + }␊ + ␊ +
␊ +
␊ + {␊ + "Hello World"␊ + }␊ + ␊ +
␊ +
␊ + println "Hello World"␊ + ␊ +
␊ +
␊ + %html␊ + %title Hello World␊ + %body␊ + %h1 Hello World␊ + ␊ +
␊ +
␊ + module Main where␊ + ␊ + main = putStrLn "Hello World"␊ + ␊ +
␊ +
␊ + class HelloWorld {␊ + static function main() {␊ + trace("Hello World");␊ + }␊ + }␊ + ␊ +
␊ +
␊ + procedure main()␊ + write("Hello World");␊ + end␊ + ␊ +
␊ +
␊ + "Hello World\\n" print␊ + ␊ +
␊ +
␊ + #!/opt/local/bin/jc␊ + echo 'Hello World'␊ + exit ''␊ + ␊ +
␊ +
␊ + public class Java {␊ + public static void main(String[] args) {␊ + System.out.println("Hello World");␊ + }␊ + }␊ + ␊ +
␊ +
␊ + { "hello": "world" }␊ + ␊ +
␊ +
␊ + println("Hello World")␊ + ␊ +
␊ +
␊ + package hello␊ + ␊ + fun main() {␊ + println("Hello World")␊ + }␊ + ␊ +
␊ +
␊ + \\documentclass{article}␊ + \\begin{document}␊ + Hello World␊ + \\end{document}␊ + ␊ +
␊ +
␊ + body::before {␊ + content: 'Hello World!';␊ + }␊ + ␊ +
␊ +
␊ + ; LISP␊ + (DEFUN hello ()␊ + (PRINT (LIST 'HELLO 'WORLD))␊ + )␊ + ␊ + (hello)␊ + ␊ +
␊ +
␊ + ;;for emacs elisp␊ + ␊ + (message "hello,world")␊ + ␊ +
␊ +
␊ + console.log "Hello World"␊ + ␊ +
␊ +
␊ + ; llvm-as llvm.ll␊ + ; x86 assembly: llc llvm.bc -o llvm.s -march x86␊ + ; interpreter: lli llvm.bc␊ + ␊ + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"␊ + @.str = internal constant [12 x i8] c"Hello World\\00"␊ + ␊ + ; puts from libc␊ + declare i32 @puts(i8*)␊ + ␊ + define i32 @main(...) {␊ + call i32 @puts(i8* getelementptr([12 x i8]* @.str, i32 0, i32 0))␊ + ret i32 0␊ + }␊ + ␊ +
␊ +
␊ + HAI␊ + CAN HAS STDIO?␊ + VISIBLE "Hello World"␊ + KTHXBYE␊ + ␊ +
␊ +
␊ + print("Hello World")␊ + ␊ +
␊ +
␊ + # Hello World␊ + ␊ +
␊ +
␊ + disp('Hello World')␊ + ␊ +
␊ +
␊ + proc helloWorld () {␊ + print "Hello World\\n";␊ + }␊ + helloWorld;␊ + ␊ +
␊ +
␊ + print 'Hello World'␊ + ␊ +
␊ +
␊ + section .text␊ + global _start ;must be declared for linker (ld)␊ + ␊ + _start: ;tell linker entry point␊ + ␊ + xor ebx,ebx ;ebx=0␊ + mov ecx,msg ;address of message to write␊ + lea edx,[ebx+len] ;message length␊ + lea eax,[ebx+4] ;system call number (sys_write)␊ + inc ebx ;file descriptor (stdout)␊ + int 0x80 ;call kernel␊ + ␊ + xor eax, eax ;set eax=0␊ + inc eax ;system call number (sys_exit)␊ + int 0x80 ;call kernel␊ + ␊ + section .rodata␊ + ␊ + msg db 'Hello, world!',0xa ;our string␊ + len equ $ - msg ;length of our string␊ + ␊ +
␊ +
␊ + echo("Hello World")␊ + ␊ +
␊ +
␊ + /*␊ + Build on OS X:␊ + clang -framework Foundation -fobjc-arc objc.m -o objc␊ + ␊ + Build on Linux with GNUstep:␊ + clang \`gnustep-config --objc-flags\` \`gnustep-config --base-libs\` -fobjc-nonfragile-abi -fobjc-arc objc.m -o objc␊ + */␊ + ␊ + #import <Foundation/Foundation.h>␊ + ␊ + int main(void)␊ + {␊ + NSLog(@"Hello World");␊ + }␊ + ␊ +
␊ +
␊ + print_string "Hello World\\n"␊ + ␊ +
␊ +
␊ + {Show 'Hello World'}␊ + ␊ +
␊ +
␊ + @main[]␊ + ^rem{Will print "Hello World" when run as CGI script}␊ + $hello[Hello World]␊ + $result[$hello]␊ + ␊ +
␊ +
␊ + program HelloWorld(output);␊ + begin␊ + writeln('Hello World');␊ + end.␊ + ␊ +
␊ +
␊ + program ObjectPascalExample;␊ + ␊ + type␊ + THelloWorld = class␊ + procedure Put;␊ + end;␊ + ␊ + procedure THelloWorld.Put;␊ + begin␊ + Writeln('Hello World');␊ + end;␊ + ␊ + var␊ + HelloWorld: THelloWorld;␊ + ␊ + begin␊ + HelloWorld := THelloWorld.Create;␊ + HelloWorld.Put;␊ + HelloWorld.Free;␊ + end.␊ + ␊ +
␊ +
␊ + #!/usr/local/bin/perl -w␊ + use CGI; # load CGI routines␊ + $q = CGI->new; # create new CGI object␊ + print $q->header, # create the HTTP header␊ + $q->start_html('Hello World'), # start the HTML␊ + $q->h1('Hello World'), # level 1 header␊ + $q->end_html; # end the HTML␊ + ␊ + # http://perldoc.perl.org/CGI.html␊ + ␊ +
␊ +
␊ + <?php␊ + ␊ + echo 'Hello World';␊ + ␊ +
␊ +
␊ + begin␊ + dbms_output.put_line('Hello World');␊ + end;␊ + /␊ + ␊ +
␊ +
␊ + 'Hello World'␊ + ␊ +
␊ +
␊ + size(128, 128);␊ + background(0);␊ + textAlign(CENTER, CENTER);␊ + fill(255);␊ + text("Hello World", width / 2, height / 2);␊ + ␊ +
␊ +
␊ + helloWorld :-␊ + write('Hello World').␊ + ␊ + :- helloWorld.␊ + ␊ +
␊ +
␊ + doctype html␊ + html␊ + head␊ + title Hello World␊ + body␊ + h1 Hello World␊ + ␊ +
␊ +
␊ + module Main where␊ + ␊ + import Debug.Trace␊ + ␊ + main = trace "Hello World"␊ + ␊ +
␊ +
␊ + If OpenConsole()␊ + PrintN("Hello World")␊ + EndIf␊ + ␊ +
␊ +
␊ + #!/usr/bin/env python␊ + print "Hello World"␊ + ␊ +
␊ +
␊ + "Hello World"␊ + ␊ +
␊ +
␊ + #!/usr/bin/env qore␊ + %exec-class HelloWorld␊ + class HelloWorld␊ + {␊ + constructor()␊ + {␊ + background $.say("Hello World");␊ + }␊ + private say($arg)␊ + {␊ + printf("%s\\n", $arg);␊ + }␊ + }␊ + ␊ +
␊ +
␊ + cat("Hello World\\n")␊ + ␊ +
␊ +
␊ + #lang racket␊ + "Hello World"␊ + ␊ +
␊ +
␊ + print_string "Hello World"␊ + ␊ +
␊ +
␊ + #!/usr/bin/env ruby␊ + puts "Hello World"␊ + ␊ +
␊ +
␊ + fn main() {␊ + println!("Hello World");␊ + }␊ + ␊ +
␊ +
␊ + %macro putit( string= );␊ + %put &string;␊ + %mend;␊ + ␊ + %putit(string=Hello World)␊ + ␊ +
␊ +
␊ + body::before␊ + content: "Hello World"␊ + ␊ +
␊ +
␊ + object HelloWorld extends App {␊ + println("Hello World")␊ + }␊ + ␊ +
␊ +
␊ + (display "Hello World") (newline)␊ + ␊ +
␊ +
␊ + #!/bin/sh␊ + echo "Hello World"␊ + ␊ +
␊ +
␊ + Transcript show: 'Hello World'.␊ + ␊ +
␊ +
␊ + pragma solidity ^0.6.4;␊ + ␊ + contract HelloWorld {␊ + function render () public pure returns (string memory) {␊ + return 'Hello World';␊ + }␊ + }␊ + ␊ +
␊ +
␊ + SELECT ?h WHERE {␊ + VALUES ?h { "Hello World" }␊ + }␊ + ␊ +
␊ +
␊ + SELECT 'Hello World';␊ + ␊ +
␊ +
␊ + body::before␊ + content: "Hello World"␊ + ␊ +
␊ +
␊ + print("Hello World")␊ + ␊ +
␊ +
␊ + puts "Hello World"␊ + ␊ +
␊ +
␊ + console.log('Hello World');␊ + ␊ +
␊ +
␊ + static void main (string[] args)␊ + {␊ + stdout.printf ("Hello World\\n");␊ + }␊ + ␊ + ␊ +
␊ +
␊ + Module HelloWorld␊ + Sub Main()␊ + System.Console.WriteLine("Hello World")␊ + End Sub␊ + End Module␊ + ␊ +
␊ +
␊ + module main;␊ + initial␊ + begin␊ + $display("Hello World");␊ + $finish;␊ + end␊ + endmodule␊ + ␊ +
␊ +
␊ + use std.textio.all;␊ + ␊ + entity hello_world is␊ + end hello_world;␊ + ␊ + architecture behaviour of hello_world is␊ + begin␊ + process␊ + begin␊ + write (output, String'("Hello World"));␊ + wait;␊ + end process;␊ + end behaviour;␊ + ␊ +
␊ +
␊ + echo "Hello World"␊ + ␊ +
␊ +
␊ + Module HelloWorld␊ + Sub Main()␊ + MsgBox("Hello World")␊ + End Sub␊ + End Module␊ + ␊ +
␊ +
␊ + Hello World␊ + ␊ +
␊ +
␊ + let $hello := "Hello World"␊ + return $hello␊ + ␊ +
␊ +
␊ + hello: world␊ + ␊ +
␊ + ` + +## legend + +> Snapshot 4 + + `␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ + file.html␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ + file.html␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ + file.html␊ +
␊ + ` + +## line-highlight + +> Snapshot 4 + + `␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + export default () => {␊ + // register current used theme␊ + const [theme, setTheme] = React.useState(themes.light);␊ + ␊ + // handle the radio changes␊ + const handleChange = ({ target }) => {␊ + // based on the radio value, toggle to the correct theme␊ + return setTheme(themes[target.value]);␊ + };␊ + ␊ + return (␊ + <ThemeProvider value={theme}>␊ + <Button>I am styled by theme context!</Button>␊ + <form onChange={handleChange}>␊ + <p>Please select your theme:</p>␊ + <input type="radio" id="light" name="theme" value="light" />␊ + <label for="light">Light</label>␊ + <input type="radio" id="dark" name="theme" value="dark" />␊ + <label for="dark">Dark</label>␊ + </form>␊ + </ThemeProvider>␊ + );␊ + };␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + export default () => {␊ + // register current used theme␊ + const [theme, setTheme] = React.useState(themes.light);␊ + ␊ + // handle the radio changes␊ + const handleChange = ({ target }) => {␊ + // based on the radio value, toggle to the correct theme␊ + return setTheme(themes[target.value]);␊ + };␊ + ␊ + return (␊ + <ThemeProvider value={theme}>␊ + <Button>I am styled by theme context!</Button>␊ + <form onChange={handleChange}>␊ + <p>Please select your theme:</p>␊ + <input type="radio" id="light" name="theme" value="light" />␊ + <label for="light">Light</label>␊ + <input type="radio" id="dark" name="theme" value="dark" />␊ + <label for="dark">Dark</label>␊ + </form>␊ + </ThemeProvider>␊ + );␊ + };␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + export default () => {␊ + // register current used theme␊ + const [theme, setTheme] = React.useState(themes.light);␊ + ␊ + // handle the radio changes␊ + const handleChange = ({ target }) => {␊ + // based on the radio value, toggle to the correct theme␊ + return setTheme(themes[target.value]);␊ + };␊ + ␊ + return (␊ + <ThemeProvider value={theme}>␊ + <Button>I am styled by theme context!</Button>␊ + <form onChange={handleChange}>␊ + <p>Please select your theme:</p>␊ + <input type="radio" id="light" name="theme" value="light" />␊ + <label for="light">Light</label>␊ + <input type="radio" id="dark" name="theme" value="dark" />␊ + <label for="dark">Dark</label>␊ + </form>␊ + </ThemeProvider>␊ + );␊ + };␊ + ␊ +
␊ + ` + +## line-numbers + +> Snapshot 4 + + `␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ + ` + +## no-lang + +> Snapshot 4 + + `␊ +
␊ +
hello␊
+    world
␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ +
hello␊
+    world
␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + hello␊ + world␊ +
␊ + ` + +## show-invisibles + +> Snapshot 4 + + `␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + <!DOCTYPE html>␊ + <html lang="en">␊ + <head>␊ + <meta charset="UTF-8" />␊ + <meta name="viewport" content="width=device-width, initial-scale=1.0" />␊ + <title>Hello World!</title>␊ + </head>␊ + <body>␊ + <h1>Hello World!</h1>␊ + </body>␊ + </html>␊ + ␊ +
␊ + ` + +## treeview + +> Snapshot 4 + + `␊ +
␊ + .␊ + ├── .eslintignore␊ + ├── .eslintrc␊ + ├── .gitignore␊ + ├── .prettierignore␊ + ├── .prettierrc␊ + ├── .yarnrc.yml␊ + ├── README.md␊ + ├── index.js␊ + ├── package.json␊ + ├── test␊ + ├── fixtures␊ + └── index.js␊ + └── yarn.lock␊ + ␊ + 7 directories, 41 files␊ + ␊ +
␊ + ` + +> Snapshot 5 + + `␊ +
␊ + .␊ + ├── .eslintignore␊ + ├── .eslintrc␊ + ├── .gitignore␊ + ├── .prettierignore␊ + ├── .prettierrc␊ + ├── .yarnrc.yml␊ + ├── README.md␊ + ├── index.js␊ + ├── package.json␊ + ├── test␊ + ├── fixtures␊ + └── index.js␊ + └── yarn.lock␊ + ␊ + 7 directories, 41 files␊ + ␊ +
␊ + ` + +> Snapshot 6 + + `
␊ + .␊ + ├── .eslintignore␊ + ├── .eslintrc␊ + ├── .gitignore␊ + ├── .prettierignore␊ + ├── .prettierrc␊ + ├── .yarnrc.yml␊ + ├── README.md␊ + ├── index.js␊ + ├── package.json␊ + ├── test␊ + ├── fixtures␊ + └── index.js␊ + └── yarn.lock␊ + ␊ + 7 directories, 41 files␊ + ␊ +
␊ + ` diff --git a/test/snapshots/index.js.snap b/test/snapshots/index.js.snap index 6813f0a..c080957 100644 Binary files a/test/snapshots/index.js.snap and b/test/snapshots/index.js.snap differ