Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created December 25, 2016 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/38f44ce0cdcde617797267794c5e2481 to your computer and use it in GitHub Desktop.
Save tmcw/38f44ce0cdcde617797267794c5e2481 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<meta charset='utf-8' />
<title>tokenizer.js documentation</title>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<link href='assets/tachyons.min.css' type='text/css' rel='stylesheet' />
<link href='assets/github.css' type='text/css' rel='stylesheet' />
<style>
a {
color: #357edd;
text-decoration: none;
}
a:hover {
transition: opacity .15s ease-in;
opacity: .5;
}
pre {
font-family: Consolas,monaco,monospace;
}
.flex-auto-0 { flex: 1 1 0%; }
</style>
</head>
<body class='consolas'>
<div class='mw8 '>
<div class='pa3 bg-white bn-ns bb b--black-20'>
<div class='dt-ns w-100'>
<div class='db dtc v-mid tl w-50'>
<a class='dib f4'>
tokenizer.js
<div class='dib'>
<span class='f6 black-70 nowrap'>v1.0.0</span>
</div>
</a>
</div>
<div class='db-ns dn dtc-ns v-mid w-100 tl tr-ns mt2 mt0-ns'>
<input type='text' class='br1 pa1 ba b--black-20' placeholder='Search...' />
</div>
<div class='dn-ns dtc v-mid w-10 tl tr mt2 mt0-ns'>
<a id='menu-toggle' class='bg-near-white pa2 br4 black-50 no-underline' href='#'>
Menu
</a>
</div>
</div>
</div>
</div>
<div class='black-70 bt-m bt-l b--black-20 bg-white'>
<div class='mw8 black-70 flex-row flex-ns'>
<menu class='dn db-ns mw5-ns w-25-ns order-1-ns pa3 ma0 bb b--black-20 bn-ns'>
<div class='ma0 mt3'>
Geography
</div>
<div class='ma0 pv1'>
<a href='#a' class='f5 fw4 dim link blue truncate db pv1'>inlineTokenizer</a>
<a href='#b' class='f5 fw4 dim link blue truncate db pv1'>renderMarkdown</a>
<a href='#b' class='f5 fw4 dim link blue truncate db pv1'>typesandnonbreakinglongname</a>
</div>
<div class='ma0 mt3'>
Basic Types
</div>
<div class='ma0 pv1'>
<a href='#a' class='f5 fw4 dim link blue truncate db pv1'>LatLng</a>
<a href='#b' class='f5 fw4 dim link blue truncate db pv1'>Rect</a>
</div>
<div class='ma0 mt3'>
Utilities
</div>
<div class='ma0 pv1'>
<a href='#a' class='f5 fw4 dim link blue truncate db pv1'>bitToMegabit</a>
<a href='#b' class='f5 fw4 dim link blue truncate db pv1'>breakfastNow</a>
</div>
</menu>
<!--
http://package.elm-lang.org/packages/elm-lang/http/latest
https://www.mapbox.com/mapbox-gl-js/api/#CameraOptions
https://reduxkit.github.io/ReduxKit/master/
https://facebook.github.io/immutable-js/docs/#/
-->
<!--
- name
- source
- @extends (multiple)
- signature
- @description
- @throws (multiple)
- @example (multiple)
- @param
- nested params
- @returns (multiple)
- info
- version
- license
- author
- copyright
- since
-->
<div class='order-2-ns flex-auto-0 black-70 bg-white'>
<div class='pa4-ns pa3'>
<div class='cf'>
<h3 class='fl f3 mb0 mt0 w-75 lh-title' id='inline_tokenizer'>
inline_tokenizer
</h3>
<div class='dn db-ns tr fl w-25'>
<a class='f5 dim link blue ph2' href='#'>info</a>
<a class='f5 dim link blue'href='#'>source</a>
</div>
</div>
<!-- <div class='pa3 bg-near-white'>
<dl class="f6 lh-title mv2">
<dt class="dib b">Copyright:</dt>
<dd class="dib ml0 gray">BigCorp</dd>
</dl>
<dl class="f6 lh-title mv2">
<dt class="dib b">Author:</dt>
<dd class="dib ml0 gray">Tom MacWright</dd>
</dl>
<dl class="f6 lh-title mv2">
<dt class="dib b">License:</dt>
<dd class="dib ml0 gray">BSD</dd>
</dl>
<dl class="f6 lh-title mv2">
<dt class="dib b">Available Since:</dt>
<dd class="dib ml0 gray">v1.0.0</dd>
</dl>
<dl class="f6 lh-title mv2">
<dt class="dib b">Version:</dt>
<dd class="dib ml0 gray">v1.0.0</dd>
</dl>
</div> -->
<div class='mt2 mb2'>
<div class='code pa3 ba br1 b--black-20'>inline_tokenizer(</span>processor: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></div>
</div>
<div class='lh-copy f5 measure-wide'>
<p>A remark plugin that installs
<a href="https://github.com/wooorm/remark/blob/master/doc/remarkplugin.3.md#function-tokenizereat-value-silent">tokenizers</a>
and <a href="https://github.com/wooorm/remark/blob/master/doc/remarkplugin.3.md#function-locatorvalue-fromindex">locators</a>
for JSDoc inline <code>{@link}</code> and <code>{@tutorial}</code> tags.</p>
<p>This does not handle the <code>[text]({@link url})</code> and <code>[text]({@tutorial url})</code> forms of these tags.
That's a JSDoc misfeature; just use regular markdown syntax instead: <code>[text](url)</code>.</p>
</div>
<h4 class='f5 mt4 mb2'>Extends</h4>
<code class='code'><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined">inlineSuperprocessor</a></code>
<h4 class='f5 mt4 mb2'>Throws</h4>
<code class='code'><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined">TypeError</a></code> when provided with an invalid processor
<h4 class='f5 mt4 mb2'>Example</h4>
<pre class='f5 code lh-copy ma0 pa2 br1 ba b--black-20'><span class="hljs-keyword">var</span> tooltip = <span class="hljs-keyword">new</span> mapboxgl.Popup()
.setLatLng(map.unproject(e.point))
.setHTML(<span class="hljs-string">"&lt;h1&gt;Hello World!&lt;/h1&gt;"</span>)
.addTo(map);</pre>
<h4 class='f5 mt4 mb2'>Parameters</h4>
<div>
<dl class="f5 lh-copy mv2 cf">
<dt class="dib code w-third fl">processor</dt>
<dd class="dib ml0 fl w-two-thirds">
<code class='mr1'><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code>
a remark instance
</dd>
</dl>
<dl class="f5 lh-copy mv2 cf">
<dt class="dib code w-third fl">anotherParamJustToTest</dt>
<dd class="dib ml0 fl w-two-thirds">
<code class='mr1'><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">string</a></code>
name of the thing
</dd>
</dl>
<dl class="f5 lh-copy mv2 cf">
<dt class="dib code w-third fl">↳ nestedParameter</dt>
<dd class="dib ml0 fl w-two-thirds">
<code class='mr1'><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Array&lt;any&gt;</a></code>
some description
</dd>
</dl>
<dl class="f5 lh-copy mv2 cf">
<dt class="dib code w-third fl">↳ otherProperty</dt>
<dd class="dib ml0 fl w-two-thirds">
<code class='mr1'><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Array&lt;any&gt;</a></code>
this property has a super duper long description just to break everything, because
there's so much text here. This is for that weird case where people write a novel as
the description for a property.
</dd>
</dl>
</div>
<h4 class='f5 mt4 mb2'>Properties</h4>
<div>
<dl class="f5 lh-copy mv2 cf">
<dt class="dib code w-third fl">someProp</dt>
<dd class="dib ml0 fl w-two-thirds">
<code class='mr1'><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code>
a remark instance
</dd>
</dl>
<dl class="f5 lh-copy mv2 cf">
<dt class="dib code w-third fl">name</dt>
<dd class="dib ml0 fl w-two-thirds">
<code class='mr1'><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">string</a></code>
name of the thing
</dd>
</dl>
<dl class="f5 lh-copy mv2 cf">
<dt class="dib code w-third fl">↳ bar</dt>
<dd class="dib ml0 fl w-two-thirds">
<code class='mr1'><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Array&lt;any&gt;</a></code>
some description
</dd>
</dl>
</div>
<h4 class='f5 mt4 mb2'>Returns</h4>
<dl class="f5 lh-title mv2 cf">
<dt class="dib code b"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">undefined</a></dt>
<dd class="dib ml0">
</dd>
</dl>
<dl class="f5 lh-title mv2 cf">
<dt class="dib code b"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">string</a></dt>
<dd class="dib ml0">
in some cases we return a string for, like no reason
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class='bt b--black-20'>
<div class='mw8 '>
<div class='pa3 bg-white'>
<div class='f6 black-70 lh-copy'>
<div>
&copy; 2016 BigCorp
</div>
<div>
Generated by <a class='blue dim link' href='http://documentation.js.org'>documentation.js v4.0.0</a>
</div>
</div>
</div>
</div>
</div>
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script>
$('#menu-toggle').click(function() {
$('menu').toggle();
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment