Skip to content

Commit 6b7daf0

Browse files
committedJul 18, 2020
docs: update
1 parent d9fd8aa commit 6b7daf0

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed
 

‎docs/404.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="icon" href="/pre/favicon.ico"/><title>404 - not found</title><meta name="description" content="404 - not found."/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"404 - not found"}</script><link rel="stylesheet" href="/pre/magic.css?IaHIeqgKAX" integrity="sha384-IaHIeqgKAXPVltBUYtWuOgSOMY7fbiwUvGRCvcfPxynVAxho7i9ZJjKQFT9myZ2v" crossorigin="anonymous"/></head><body><a class="SkipLink" href="/pre/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><div><a class="Logo" href="/pre/"><svg viewBox="0 0 512 444"><path d="M512 444L256 0 0 444z" fill="#663695"></path><circle cx="256" cy="294" r="130" fill="#fff"></circle><circle cx="256" cy="281" r="40" fill="#663695"></circle><path d="M256 350v44m24-44l1 13c1 27 29 27 29-7m-160-72s46-47 106-47c59 0 106 47 106 47s-47 43-106 43c-60 0-106-43-106-43zm65-75a134 134 0 0189 2" class="stroke"></path><path d="M256 81v53m184 270l-43-29M72 404l43-29" class="stroke white"></path></svg></a><p>Pre</p><nav class="Menu"><ul><li><a href="/pre/#installation">installation</a></li><li><a href="/pre/#usage">usage</a></li><li><a href="/pre/#themes">themes</a></li><li><a href="/pre/#syntax">syntax</a></li><li><a href="/pre/#source">source</a></li></ul></nav></div></header><div class="Page" id="page"><div>404 - not found.</div></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/pre/magic.js?mG1lzyixcw" integrity="sha384-mG1lzyixcw6plP3LQSlS7Z2qxlXtsJN9f+2m4yFbJiHlfRc4As4evmGbEBnbHSCf" crossorigin="anonymous"></script></body></html>
1+
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="icon" href="/pre/favicon.ico"/><title>404 - not found</title><meta name="description" content="404 - not found."/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"404 - not found"}</script><link rel="stylesheet" href="/pre/magic.css?/dz1c7J6y4" integrity="sha384-/dz1c7J6y42E0eCzAv8FlX5isd3GiPVlvRYzwxVc31ZmoxOnFREg0knYaEWedM33" crossorigin="anonymous"/></head><body><a class="SkipLink" href="/pre/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><div><a class="Logo" href="/pre/"><svg viewBox="0 0 512 444"><path d="M512 444L256 0 0 444z" fill="#663695"></path><circle cx="256" cy="294" r="130" fill="#fff"></circle><circle cx="256" cy="281" r="40" fill="#663695"></circle><path d="M256 350v44m24-44l1 13c1 27 29 27 29-7m-160-72s46-47 106-47c59 0 106 47 106 47s-47 43-106 43c-60 0-106-43-106-43zm65-75a134 134 0 0189 2" class="stroke"></path><path d="M256 81v53m184 270l-43-29M72 404l43-29" class="stroke white"></path></svg></a><p>Pre</p><nav class="Menu"><ul><li><a href="/pre/#installation">installation</a></li><li><a href="/pre/#usage">usage</a></li><li><a href="/pre/#themes">themes</a></li><li><a href="/pre/#syntax">syntax</a></li><li><a href="/pre/#source">source</a></li></ul></nav></div></header><div class="Page" id="page"><div>404 - not found.</div></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/pre/magic.js?tPRxWPseB6" integrity="sha384-tPRxWPseB6ZVCKzl585oScHYcRb2CVhwDhD2GP3RvhyKLg0kkeiI2Y18fRVKMSoM" crossorigin="anonymous"></script></body></html>

‎docs/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="icon" href="/pre/favicon.ico"/><title>@magic-modules/pre</title><meta name="description" content="syntax highlighting for javascript"/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"@magic-modules/pre"}</script><link rel="stylesheet" href="/pre/magic.css?IaHIeqgKAX" integrity="sha384-IaHIeqgKAXPVltBUYtWuOgSOMY7fbiwUvGRCvcfPxynVAxho7i9ZJjKQFT9myZ2v" crossorigin="anonymous"/></head><body><a class="SkipLink" href="/pre/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><div><a class="Logo" href="/pre/"><svg viewBox="0 0 512 444"><path d="M512 444L256 0 0 444z" fill="#663695"></path><circle cx="256" cy="294" r="130" fill="#fff"></circle><circle cx="256" cy="281" r="40" fill="#663695"></circle><path d="M256 350v44m24-44l1 13c1 27 29 27 29-7m-160-72s46-47 106-47c59 0 106 47 106 47s-47 43-106 43c-60 0-106-43-106-43zm65-75a134 134 0 0189 2" class="stroke"></path><path d="M256 81v53m184 270l-43-29M72 404l43-29" class="stroke white"></path></svg></a><p>Pre</p><nav class="Menu"><ul><li><a href="/pre/#installation">installation</a></li><li><a href="/pre/#usage">usage</a></li><li><a href="/pre/#themes">themes</a></li><li><a href="/pre/#syntax">syntax</a></li><li><a href="/pre/#source">source</a></li></ul></nav></div></header><div class="Page" id="page"><h1 id="magic-modulespre">@magic-modules/pre</h1><p>this is the
1+
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="icon" href="/pre/favicon.ico"/><title>@magic-modules/pre</title><meta name="description" content="syntax highlighting for javascript"/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"@magic-modules/pre"}</script><link rel="stylesheet" href="/pre/magic.css?/dz1c7J6y4" integrity="sha384-/dz1c7J6y42E0eCzAv8FlX5isd3GiPVlvRYzwxVc31ZmoxOnFREg0knYaEWedM33" crossorigin="anonymous"/></head><body><a class="SkipLink" href="/pre/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><div><a class="Logo" href="/pre/"><svg viewBox="0 0 512 444"><path d="M512 444L256 0 0 444z" fill="#663695"></path><circle cx="256" cy="294" r="130" fill="#fff"></circle><circle cx="256" cy="281" r="40" fill="#663695"></circle><path d="M256 350v44m24-44l1 13c1 27 29 27 29-7m-160-72s46-47 106-47c59 0 106 47 106 47s-47 43-106 43c-60 0-106-43-106-43zm65-75a134 134 0 0189 2" class="stroke"></path><path d="M256 81v53m184 270l-43-29M72 404l43-29" class="stroke white"></path></svg></a><p>Pre</p><nav class="Menu"><ul><li><a href="/pre/#installation">installation</a></li><li><a href="/pre/#usage">usage</a></li><li><a href="/pre/#themes">themes</a></li><li><a href="/pre/#syntax">syntax</a></li><li><a href="/pre/#source">source</a></li></ul></nav></div></header><div class="Page" id="page"><h1 id="magic-modulespre">@magic-modules/pre</h1><p>this is the
22
<a href="https://github.com/magic-modules" target="_blank" rel="noopener">@magic-modules</a>
33
Pre component.</p><p>syntax highlighting for javascript</p><ul class="GitBadges"><li><a href="https://www.npmjs.com/package/@magic-modules/pre" target="_blank" rel="noopener"><img src="https://img.shields.io/npm/v/@magic-modules/pre?color=blue" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><img src="https://img.shields.io/node/v/@magic-modules/pre?color=blue" height="23" role="presentation" alt="" loading="lazy"/></li><li><img src="https://img.shields.io/npm/l/@magic-modules/pre?color=blue" height="23" role="presentation" alt="" loading="lazy"/></li><li><a href="https://travis-ci.com/magic-modules/pre" target="_blank" rel="noopener"><img src="https://img.shields.io/travis/com/magic-modules/pre/master" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><a href="https://ci.appveyor.com/project/magicmodules/pre/branch/master" target="_blank" rel="noopener"><img src="https://img.shields.io/appveyor/ci/magicmodules/pre/master.svg" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><a href="https://coveralls.io/github/magic-modules/pre" target="_blank" rel="noopener"><img src="https://img.shields.io/coveralls/github/magic-modules/pre/master.svg" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><a href="https://snyk.io/test/github/magic-modules/pre" target="_blank" rel="noopener"><img src="https://img.shields.io/snyk/vulnerabilities/github/magic-modules/pre.svg" height="23" role="presentation" alt="" loading="lazy"/></a></li></ul><h2 id="installation">installation</h2><div class="Pre"><div class="menu"><button>copy</button></div><pre><code class="line"><span class="keyword">npm</span> <span class="keyword">install</span> @magic-modules/pre</code></pre></div><h2 id="usage">usage</h2><h3 id="multi-line">multi line</h3><p>in a page/component, just pass some string to the markdown code component:</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line">```</code><code class="line"><span class="keyword">const</span> foo = bar <span class="keyword">=&gt;</span> {</code><code class="line"> console.log(bar)</code><code class="line">}</code><code class="line">```</code></pre></div><p>renders</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line"><span class="keyword">const</span> foo = bar <span class="keyword">=&gt;</span> {</code><code class="line"> console.log(bar)</code><code class="line">}</code></pre></div><h3 id="single-lines">single lines</h3><p>single line code blocks work:</p><div class="Pre"><div class="menu"><button>copy</button></div><pre><code class="line">`one line of code`</code></pre></div><p>renders</p><div class="Pre"><div class="menu"><button>copy</button></div><pre><code class="line">one line of code</code></pre></div><h3 id="native-module">native module</h3><p>if the string passed to Pre has to include a `, the &lt;Pre&gt; module can be used directly:</p><h4 id="single-line">single line</h4><div class="Pre"><div class="menu"><button>copy</button></div><pre><code class="line">&lt;Pre lines=<span class="string">&quot;false&quot;</span>&gt;`line of code`&lt;Pre&gt;</code></pre></div><p>renders</p><div class="Pre"><div class="menu"><button>copy</button></div><pre><code class="line">`line of code`</code></pre></div><h2 id="themes">themes</h2><p>pre supports two color themes. It will automatically adapt to the global theme settings.</p><p>the @magic-modules/<a href="https://github.com/magic-modules/light-switch" target="_blank" rel="noopener">light-switch</a>
44
module allows users to toggle dark/light modes, which will also recolor pre to match.</p><p>if you have javascript activated,
@@ -10,4 +10,4 @@
1010
and at least one `@`.</p><p>yes, strictly speaking, name@host is a valid email, but how often have you seen that?</p><p>if you actually do need support for name@local, please file an issue.</p><h3 id="examples">examples</h3><div class="Pre"><div class="menu"><button>copy</button></div><pre><code class="line"><a href="mail@jaeh.at" target="_blank" rel="noopener">mail@jaeh.at</a></code></pre></div><div class="Pre"><div class="menu"><button>copy</button></div><pre><code class="line"><a href="mailto:mail@jaeh.at" target="_blank" rel="noopener">mailto:mail@jaeh.at</a></code></pre></div><p>link in a comment:</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line"><span class="keyword">const</span> v = <span class="string">&quot;t&quot;</span> <span class="comment">// comment <a href="https://jaeh.at" target="_blank" rel="noopener">https://jaeh.at</a></span></code><code class="line"><span class="comment">// and <span class="keyword">in</span> a comment starting the line <a href="https://wizardsatwork.at" target="_blank" rel="noopener">https://wizardsatwork.at</a></span></code></pre></div><p>Without line numbers</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line">&lt;Pre lines=<span class="string">&quot;false&quot;</span>&gt;</code><code class="line"><span class="builtin">String</span> to highlight</code><code class="line">without</code><code class="line">line</code><code class="line">numbers</code><code class="line">&lt;/Pre&gt;</code></pre></div><div class="Pre"><div class="menu"><button>copy</button></div><pre><code class="line"><span class="builtin">String</span> to highlight</code><code class="line">without</code><code class="line">line</code><code class="line">numbers</code></pre></div><h1 id="comments-with-indent">comments with indent</h1><p>comments can be indented:</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line"><span class="comment">// no indent</span></code><code class="line"> <span class="comment">// 2 spaces</span></code><code class="line"> <span class="comment">// 4 spaces</span></code></pre></div><h4 id="multiline">multiline</h4><p>multiline strings and comments currently do not get handled</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line">&lt;Pre&gt;</code><code class="line">`</code><code class="line">Multiline</code><code class="line">string</code><code class="line">`</code><code class="line"></code><code class="line">`</code><code class="line">Second</code><code class="line">Multiline</code><code class="line"><span class="builtin">String</span></code><code class="line">`</code><code class="line">&lt;/Pre&gt;</code></pre></div><p>renders</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line">`</code><code class="line">Multiline</code><code class="line">string.</code><code class="line">`</code><code class="line"></code><code class="line">`</code><code class="line">Second</code><code class="line">Multiline</code><code class="line"><span class="builtin">String</span></code><code class="line">`</code></pre></div><p>multiline comments</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line">```</code><code class="line">/*</code><code class="line">multiline</code><code class="line">comments</code><code class="line">*/</code><code class="line">```</code></pre></div><p>renders</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line">/*</code><code class="line">multiline</code><code class="line">comments</code><code class="line">*/</code></pre></div><h2 id="source">source</h2><p>the source for this page is in the
1111
<a href="https://github.com/magic-modules/pre/tree/master/example" target="_blank" rel="noopener">example directory</a>,
1212
and gets built and published to github using
13-
<a href="https://github.com/magic/core" target="_blank" rel="noopener">@magic/core</a></p></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/pre/magic.js?mG1lzyixcw" integrity="sha384-mG1lzyixcw6plP3LQSlS7Z2qxlXtsJN9f+2m4yFbJiHlfRc4As4evmGbEBnbHSCf" crossorigin="anonymous"></script></body></html>
13+
<a href="https://github.com/magic/core" target="_blank" rel="noopener">@magic/core</a></p></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/pre/magic.js?tPRxWPseB6" integrity="sha384-tPRxWPseB6ZVCKzl585oScHYcRb2CVhwDhD2GP3RvhyKLg0kkeiI2Y18fRVKMSoM" crossorigin="anonymous"></script></body></html>

‎docs/magic.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/magic.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/sri-hashes.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"/magic.css": "sha384-IaHIeqgKAXPVltBUYtWuOgSOMY7fbiwUvGRCvcfPxynVAxho7i9ZJjKQFT9myZ2v",
3-
"/magic.js": "sha384-mG1lzyixcw6plP3LQSlS7Z2qxlXtsJN9f+2m4yFbJiHlfRc4As4evmGbEBnbHSCf",
4-
"/pre/": "sha384-poeLnWfaXLMynEy0A8LCRoX+xo11zffGtmg32pAU8RVT1kM2ZjrUw6YpqazUlPyr",
5-
"/pre/404/": "sha384-+XfR3nfdZpnJgtmbkoKLc3eOOwzH03vZXZxPvK6KNtsU5GhQSYzElh3NRchyZYVM",
2+
"/magic.css": "sha384-/dz1c7J6y42E0eCzAv8FlX5isd3GiPVlvRYzwxVc31ZmoxOnFREg0knYaEWedM33",
3+
"/magic.js": "sha384-tPRxWPseB6ZVCKzl585oScHYcRb2CVhwDhD2GP3RvhyKLg0kkeiI2Y18fRVKMSoM",
4+
"/pre/": "sha384-wDfDFlZOr9iwXjCGRZL4sNZeay8U+Td45/usIYPOuNDBCyHsPLTtU/rLDU+DbkeQ",
5+
"/pre/404/": "sha384-1DMY5GI1joMN9Qf/QC/rxCJtqRJ9ddKmv5qnS1RlU1wvU/gjLtWpXP7lvH7fgsl0",
66
"/robots.txt": "sha384-Xcv32tijQIRIxWmxyitFQ/is0g4PfFX6+U09krHgL9YXdKALna5oQpV2oqXeCnFp",
77
"/sitemap.xml": "sha384-lq4DyU5fOIRE+MOk56jI8R6oMo7ASUaQxSgK0bkaUwngW10qR1FJxHhAX6sn+3A7"
88
}

0 commit comments

Comments
 (0)
Please sign in to comment.