Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
[fixed] Markup class definition in the webcompiler.js interface file
Browse files Browse the repository at this point in the history
  • Loading branch information
thealjey committed Feb 1, 2016
1 parent 1ddbaa4 commit 2071e3a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/Markup.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ <h1 class="page-title">Source: Markup.js</h1>
* @return {string} a transformed string
*/
transform(html: string): string {
return reduce(this.transformers, (result, replacer) => replacer(result), html);
return reduce(this.transformers, (result, transformer) => transformer(result), html);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion docs/quicksearch.html

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions interfaces/webcompiler.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow */

import type {ProgramData, ProgramDataCallback, JSLintCallback, NativeProcessCallback,
import type {ProgramData, ProgramDataCallback, JSLintCallback, NativeProcessCallback, Transformer,
ObjectOrErrorCallback} from '../src/typedef';

declare module 'webcompiler' {
Expand All @@ -17,9 +17,10 @@ declare module 'webcompiler' {
}

declare class Markup {
static markdownToHTML(markdown: string): string;
static htmlToJSX(html: string): Array<any>;
static markdownToJSX(markdown: string): Array<any>;
constructor(...transformers: Array<Transformer>): void;
htmlToJSX(html: string): Array<any>;
markdownToHTML(markdown: string): string;
markdownToJSX(markdown: string): Array<any>;
}

declare function watch(dir: string, type: string, callback: () => void): void;
Expand Down
4 changes: 2 additions & 2 deletions lib/Markup.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ var Markup = exports.Markup = function () {
* @return {string} a transformed string
*/
value: function transform(html) {
return (0, _reduce2.default)(this.transformers, function (result, replacer) {
return replacer(result);
return (0, _reduce2.default)(this.transformers, function (result, transformer) {
return transformer(result);
}, html);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"eslint-config-airbnb": "^4.0.0",
"eslint-plugin-babel": "^3.0.0",
"eslint-plugin-flow-vars": "^0.1.3",
"eslint-plugin-lodash": "^1.0.2",
"eslint-plugin-lodash": "^1.0.3",
"eslint-plugin-react": "^3.16.1",
"fb-watchman": "^1.9.0",
"ink-docstrap": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Markup.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class Markup {
* @return {string} a transformed string
*/
transform(html: string): string {
return reduce(this.transformers, (result, replacer) => replacer(result), html);
return reduce(this.transformers, (result, transformer) => transformer(result), html);
}

/**
Expand Down

0 comments on commit 2071e3a

Please sign in to comment.