Skip to content

Commit

Permalink
Build the dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Pete Chappell committed Mar 11, 2019
1 parent 9329ba0 commit 2665549
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
12 changes: 11 additions & 1 deletion dist/me-markdown.no-deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

var toTurndownOptions = options.toTurndownOptions = Object(options.toTurndownOptions);
toTurndownOptions.converters = toTurndownOptions.converters || [];
toTurndownOptions.customRules = toTurndownOptions.customRules || [];

if (!options.ignoreBuiltinConverters) {
toTurndownOptions.converters.push({
Expand Down Expand Up @@ -67,7 +68,16 @@
normalizeList($lists[i]);
}

callback( new TurndownService(options.toTurndownOptions).turndown($clone.innerHTML).split("\n").map(function (c) {
var turndownService = new TurndownService(options.toTurndownOptions);

toTurndownOptions.customRules.forEach(function(customRule) {
turndownService.addRule(customRule.key, {
filter: customRule.filter,
replacement: customRule.replacement
})
});

callback(turndownService.turndown($clone.innerHTML).split("\n").map(function (c) {
return c.replace(rightWhitespace, '');
}).join("\n").replace(rightWhitespace, ''));
}.bind(this);
Expand Down
2 changes: 1 addition & 1 deletion dist/me-markdown.no-deps.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion dist/me-markdown.standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@ return TurndownService;

var toTurndownOptions = options.toTurndownOptions = Object(options.toTurndownOptions);
toTurndownOptions.converters = toTurndownOptions.converters || [];
toTurndownOptions.customRules = toTurndownOptions.customRules || [];

if (!options.ignoreBuiltinConverters) {
toTurndownOptions.converters.push({
Expand Down Expand Up @@ -1001,7 +1002,16 @@ return TurndownService;
normalizeList($lists[i]);
}

callback( new TurndownService(options.toTurndownOptions).turndown($clone.innerHTML).split("\n").map(function (c) {
var turndownService = new TurndownService(options.toTurndownOptions);

toTurndownOptions.customRules.forEach(function(customRule) {
turndownService.addRule(customRule.key, {
filter: customRule.filter,
replacement: customRule.replacement
})
});

callback(turndownService.turndown($clone.innerHTML).split("\n").map(function (c) {
return c.replace(rightWhitespace, '');
}).join("\n").replace(rightWhitespace, ''));
}.bind(this);
Expand Down
Loading

0 comments on commit 2665549

Please sign in to comment.