Skip to content

Commit

Permalink
Formatting of README
Browse files Browse the repository at this point in the history
  • Loading branch information
jsantell committed Oct 15, 2012
1 parent b9a9788 commit 0db72d3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Expand Up @@ -15,7 +15,7 @@ Parse text for keywords and replace with links for documentation

### Methods

* `parse( text, map, options )` Parses string `text` replacing instances of map's keys with an anchor with an href to the key's value.
* `parse( text, map, options )` Parses string `text` replacing instances of `map`'s keys with an anchor with an href to the key's value.

### Options

Expand All @@ -26,7 +26,10 @@ Parse text for keywords and replace with links for documentation
```javascript
var
inject = require( 'link-inject' ),
html = '<div>Modern browsers are now implementing a Float32Array type, which is a typed array version of an Array, except it only holds 32-bit floating point numbers. The <a href="#Float32Array">Float32Array</a> is frequently used in 3D WebGL applications and audio processing.</div>
html = '<div>Modern browsers are now implementing a Float32Array type, ' +
'which is a typed array version of an Array, except it only holds 32-bit ' +
'floating point numbers. The <a href="#Float32Array">Float32Array</a> is ' +
'frequently used in 3D WebGL applications and audio processing.</div>';
// Using local links, but can be anything -- the keys' values are put into the href attribute
map = {
'Array' : '#Array',
Expand All @@ -37,10 +40,13 @@ var output = inject.parse( html, map );
console.log( output );
```

Outputs:
Outputs (spacing added for viewing):
```html
<div>
Modern browsers are now implementing a <a href="#Float32Array" title="Float32Array">Float32Array</a> type, which is a typed array version of an <a href="#Array" title="Array">Array</a>, except it only holds 32-bit floating point numbers. The <a href="#Float32Array">Float32Array</a> is frequently used in 3D WebGL applications and audio processing.
Modern browsers are now implementing a <a href="#Float32Array" title="Float32Array">Float32Array</a>
type, which is a typed array version of an <a href="#Array" title="Array">Array</a>, except it
only holds 32-bit floating point numbers. The <a href="#Float32Array">Float32Array</a>
is frequently used in 3D WebGL applications and audio processing.
</div>
```

Expand Down

0 comments on commit 0db72d3

Please sign in to comment.