Skip to content

Commit

Permalink
fix display of markdown code and links (#50)
Browse files Browse the repository at this point in the history
* fix display of markdown links
* fix backtick
  • Loading branch information
nolanlawson authored May 21, 2018
1 parent 43b02c5 commit e237b11
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 36 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ blobUtil.blobToArrayBuffer(blob).then(function (arrayBuff) {
| blob | `Blob` | - |

**Returns:** `Promise`<`ArrayBuffer`>
Promise that resolves with the <code>ArrayBuffer</code>
Promise that resolves with the `ArrayBuffer`

___
<a id="blobtobase64string"></a>
Expand Down Expand Up @@ -408,7 +408,7 @@ blobUtil.canvasToBlob(canvas, 'image/webp').then(function (blob) {
| `Optional` quality | `number` | a number between 0 and 1 indicating image quality if the requested type is 'image/jpeg' or 'image/webp' |

**Returns:** `Promise`<`Blob`>
Promise that resolves with the <code>Blob</code>
Promise that resolves with the `Blob`

___
<a id="createblob"></a>
Expand All @@ -417,7 +417,7 @@ ___

**createBlob**(parts: *`Array`<`any`>*, properties?: * `BlobPropertyBag` &#124; `string`*): `Blob`

Shim for [`new Blob()`](https://developer.mozilla.org/en-US/docs/Web/API/Blob.Blob ) to support [older browsers that use the deprecated `BlobBuilder` API](http://caniuse.com/blob ).
Shim for [`new Blob()`](https://developer.mozilla.org/en-US/docs/Web/API/Blob.Blob) to support [older browsers that use the deprecated `BlobBuilder` API](http://caniuse.com/blob).

Example:

Expand All @@ -429,8 +429,8 @@ var myBlob = blobUtil.createBlob(['hello world'], {type: 'text/plain'});

| Param | Type | Description |
| ------ | ------ | ------ |
| parts | `Array`<`any`> | content of the <code>Blob</code> |
| `Optional` properties | `BlobPropertyBag` &#124; `string`| usually <code>{type: myContentType}</code>, you can also pass a string for the content type |
| parts | `Array`<`any`> | content of the Blob |
| `Optional` properties | `BlobPropertyBag` &#124; `string`| usually `{type: myContentType}`, you can also pass a string for the content type |

**Returns:** `Blob`
Blob
Expand All @@ -442,7 +442,7 @@ ___

**createObjectURL**(blob: *`Blob`*): `string`

Shim for [`URL.createObjectURL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL.createObjectURL ) to support browsers that only have the prefixed `webkitURL` (e.g. Android <4.4).
Shim for [`URL.createObjectURL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL.createObjectURL) to support browsers that only have the prefixed `webkitURL` (e.g. Android <4.4).

Example:

Expand Down Expand Up @@ -522,7 +522,7 @@ blobUtil.imgSrcToBlob('http://some-other-site.com/img.jpg', 'image/jpeg',
| `Optional` quality | `number` | a number between 0 and 1 indicating image quality if the requested type is 'image/jpeg' or 'image/webp' |

**Returns:** `Promise`<`Blob`>
Promise that resolves with the <code>Blob</code>
Promise that resolves with the `Blob`

___
<a id="imgsrctodataurl"></a>
Expand Down Expand Up @@ -572,7 +572,7 @@ ___

**revokeObjectURL**(url: *`string`*): `void`

Shim for [`URL.revokeObjectURL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL.revokeObjectURL ) to support browsers that only have the prefixed `webkitURL` (e.g. Android <4.4).
Shim for [`URL.revokeObjectURL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL.revokeObjectURL) to support browsers that only have the prefixed `webkitURL` (e.g. Android <4.4).

Example:

Expand Down
56 changes: 28 additions & 28 deletions src/blob-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ import { loadImage, imgToCanvas } from './private'

/**
* Shim for
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Blob.Blob | <code>new Blob()</code>}
* [`new Blob()`](https://developer.mozilla.org/en-US/docs/Web/API/Blob.Blob)
* to support
* {@link http://caniuse.com/blob | older browsers that use the deprecated <code>BlobBuilder</code> API}.
* [older browsers that use the deprecated `BlobBuilder` API](http://caniuse.com/blob).
*
* Example:
*
* ```js
* var myBlob = blobUtil.createBlob(['hello world'], {type: 'text/plain'});
* ```
*
* @param parts - content of the <code>Blob</code>
* @param properties - usually <code>{type: myContentType}</code>,
* @param parts - content of the Blob
* @param properties - usually `{type: myContentType}`,
* you can also pass a string for the content type
* @returns Blob
*/
Expand Down Expand Up @@ -59,9 +59,9 @@ export function createBlob (parts: Array<any>, properties?: BlobPropertyBag | st

/**
* Shim for
* {@link https://developer.mozilla.org/en-US/docs/Web/API/URL.createObjectURL | <code>URL.createObjectURL()</code>}
* [`URL.createObjectURL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL.createObjectURL)
* to support browsers that only have the prefixed
* <code>webkitURL</code> (e.g. Android <4.4).
* `webkitURL` (e.g. Android <4.4).
*
* Example:
*
Expand All @@ -78,9 +78,9 @@ export function createObjectURL (blob: Blob): string {

/**
* Shim for
* {@link https://developer.mozilla.org/en-US/docs/Web/API/URL.revokeObjectURL | <code>URL.revokeObjectURL()</code>}
* [`URL.revokeObjectURL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL.revokeObjectURL)
* to support browsers that only have the prefixed
* <code>webkitURL</code> (e.g. Android <4.4).
* `webkitURL` (e.g. Android <4.4).
*
* Example:
*
Expand All @@ -95,7 +95,7 @@ export function revokeObjectURL (url: string): void {
}

/**
* Convert a <code>Blob</code> to a binary string.
* Convert a `Blob` to a binary string.
*
* Example:
*
Expand Down Expand Up @@ -131,7 +131,7 @@ export function blobToBinaryString (blob: Blob): Promise<string> {
}

/**
* Convert a base64-encoded string to a <code>Blob</code>.
* Convert a base64-encoded string to a `Blob`.
*
* Example:
*
Expand All @@ -148,7 +148,7 @@ export function base64StringToBlob (base64: string, type?: string): Blob {
}

/**
* Convert a binary string to a <code>Blob</code>.
* Convert a binary string to a `Blob`.
*
* Example:
*
Expand All @@ -165,7 +165,7 @@ export function binaryStringToBlob (binary: string, type?: string): Blob {
}

/**
* Convert a <code>Blob</code> to a binary string.
* Convert a `Blob` to a binary string.
*
* Example:
*
Expand All @@ -186,8 +186,8 @@ export function blobToBase64String (blob: Blob): Promise<string> {

/**
* Convert a data URL string
* (e.g. <code>'data:image/png;base64,iVBORw0KG...'</code>)
* to a <code>Blob</code>.
* (e.g. `'data:image/png;base64,iVBORw0KG...'`)
* to a `Blob`.
*
* Example:
*
Expand All @@ -207,8 +207,8 @@ export function dataURLToBlob (dataURL: string): Blob {
}

/**
* Convert a <code>Blob</code> to a data URL string
* (e.g. <code>'data:image/png;base64,iVBORw0KG...'</code>).
* Convert a `Blob` to a data URL string
* (e.g. `'data:image/png;base64,iVBORw0KG...'`).
*
* Example:
*
Expand All @@ -226,8 +226,8 @@ export function blobToDataURL (blob: Blob): Promise<string> {
}

/**
* Convert an image's <code>src</code> URL to a data URL by loading the image and painting
* it to a <code>canvas</code>.
* Convert an image's `src` URL to a data URL by loading the image and painting
* it to a `canvas`.
*
* Note: this will coerce the image to the desired content type, and it
* will only paint the first frame of an animated GIF.
Expand Down Expand Up @@ -268,7 +268,7 @@ export function imgSrcToDataURL (src: string, type?: string, crossOrigin?: strin
}

/**
* Convert a <code>canvas</code> to a <code>Blob</code>.
* Convert a `canvas` to a `Blob`.
*
* Examples:
*
Expand All @@ -295,7 +295,7 @@ export function imgSrcToDataURL (src: string, type?: string, crossOrigin?: strin
* @param type - the content type (optional, defaults to 'image/png')
* @param quality - a number between 0 and 1 indicating image quality
* if the requested type is 'image/jpeg' or 'image/webp'
* @returns Promise that resolves with the <code>Blob</code>
* @returns Promise that resolves with the `Blob`
*/
export function canvasToBlob (canvas: HTMLCanvasElement, type?: string, quality?: number): Promise<Blob> {
if (typeof canvas.toBlob === 'function') {
Expand All @@ -307,8 +307,8 @@ export function canvasToBlob (canvas: HTMLCanvasElement, type?: string, quality?
}

/**
* Convert an image's <code>src</code> URL to a <code>Blob</code> by loading the image and painting
* it to a <code>canvas</code>.
* Convert an image's `src` URL to a `Blob` by loading the image and painting
* it to a `canvas`.
*
* Note: this will coerce the image to the desired content type, and it
* will only paint the first frame of an animated GIF.
Expand Down Expand Up @@ -338,7 +338,7 @@ export function canvasToBlob (canvas: HTMLCanvasElement, type?: string, quality?
* 'Anonymous' to avoid "tainted canvas" errors
* @param quality - a number between 0 and 1 indicating image quality
* if the requested type is 'image/jpeg' or 'image/webp'
* @returns Promise that resolves with the <code>Blob</code>
* @returns Promise that resolves with the `Blob`
*/
export function imgSrcToBlob (src: string, type?: string, crossOrigin?: string, quality?: number): Promise<Blob> {
type = type || 'image/png'
Expand All @@ -349,7 +349,7 @@ export function imgSrcToBlob (src: string, type?: string, crossOrigin?: string,
}

/**
* Convert an <code>ArrayBuffer</code> to a <code>Blob</code>.
* Convert an `ArrayBuffer` to a `Blob`.
*
* Example:
*
Expand All @@ -366,7 +366,7 @@ export function arrayBufferToBlob (buffer: ArrayBuffer, type?: string): Blob {
}

/**
* Convert a <code>Blob</code> to an <code>ArrayBuffer</code>.
* Convert a `Blob` to an `ArrayBuffer`.
*
* Example:
*
Expand All @@ -379,7 +379,7 @@ export function arrayBufferToBlob (buffer: ArrayBuffer, type?: string): Blob {
* ```
*
* @param blob
* @returns Promise that resolves with the <code>ArrayBuffer</code>
* @returns Promise that resolves with the `ArrayBuffer`
*/
export function blobToArrayBuffer (blob: Blob): Promise<ArrayBuffer> {
return new Promise(function (resolve, reject) {
Expand All @@ -394,7 +394,7 @@ export function blobToArrayBuffer (blob: Blob): Promise<ArrayBuffer> {
}

/**
* Convert an <code>ArrayBuffer</code> to a binary string.
* Convert an `ArrayBuffer` to a binary string.
*
* Example:
*
Expand All @@ -417,7 +417,7 @@ export function arrayBufferToBinaryString (buffer: ArrayBuffer): string {
}

/**
* Convert a binary string to an <code>ArrayBuffer</code>.
* Convert a binary string to an `ArrayBuffer`.
*
* ```js
* var myBuffer = blobUtil.binaryStringToArrayBuffer(binaryString)
Expand Down

0 comments on commit e237b11

Please sign in to comment.