markademic
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -1,54 +0,13 @@ | ||
declare module "remarkable" { | ||
namespace Remarkable { | ||
declare function markademic(config: { | ||
input: string; | ||
citations: any; | ||
symbols: { | ||
[latexSymbol: string]: { | ||
type: string; | ||
description: string; | ||
}; | ||
}; | ||
rerouteLinks: ((str: string) => string); | ||
}): string; | ||
} | ||
class Remarkable { | ||
constructor(config: { html: boolean, highlight: (str: string, lang: string) => string }); | ||
render(str: string): string; | ||
} | ||
export = Remarkable; | ||
} | ||
declare module "highlight.js" { | ||
namespace hl { | ||
export function getLanguage(lang: string): boolean; | ||
export function highlight(lang: string, str: string): { value: string }; | ||
export function highlightAuto(str): { value: string }; | ||
} | ||
export = hl; | ||
} | ||
type BibjSON = { | ||
[citation: string]: any | ||
}declare module 'markademic/src/jsonrender' { | ||
function symbolRender(input: string, symbols: Object): string; function citationsRender(input: string, citations: BibjSON): string; | ||
export { symbolRender, citationsRender }; | ||
} | ||
declare module 'markademic/src/katex' { | ||
var _default: (str: string) => any; | ||
export default _default; | ||
} | ||
declare module 'markademic/src/markademic' { | ||
export type Config = { | ||
input: string; | ||
citations: any; | ||
symbols: { | ||
[latexSymbol: string]: { | ||
type: string; | ||
description: string; | ||
}; | ||
}; | ||
rerouteLinks: ((str: string) => string); | ||
}; function markademic(config: Config): any; | ||
export default markademic; | ||
} | ||
export default markademic; |
@@ -79,6 +79,29 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/* 0 */ | ||
/***/ function(module, exports) { | ||
/***/ function(module, exports, __webpack_require__) { | ||
throw new Error("Module build failed: \u001b[31mCould not load TypeScript. Try installing with `npm install typescript`. If TypeScript is installed globally, try using `npm link typescript`.\u001b[39m"); | ||
"use strict"; | ||
"use strict"; | ||
var remarkable_1 = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"./remarkable\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var katex_1 = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"./katex\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var reroute_1 = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"./reroute\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
var jsonrender_1 = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"./jsonrender\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
/** | ||
* Processes Markdown with Syntax Highlighting | ||
* and Latex Preprocessors, and adds references. | ||
*/ | ||
function markademic(config) { | ||
var out = katex_1.default(config.input); | ||
out = remarkable_1.default(out); | ||
if (config.rerouteLinks) | ||
out = reroute_1.default(out, config.rerouteLinks); | ||
if (config.symbols) | ||
out = jsonrender_1.symbolRender(out, config.symbols); | ||
if (config.citations) | ||
out = jsonrender_1.citationsRender(out, config.citations); | ||
return out; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = markademic; | ||
/***/ } | ||
@@ -85,0 +108,0 @@ /******/ ]) |
{ | ||
"name": "markademic", | ||
"version": "0.1.0", | ||
"description": "🏛 A markdown parser with academic features included.", | ||
"version": "0.1.1", | ||
"description": "🏫 A markdown parser with academic features included.", | ||
"main": "dist/markademic.js", | ||
@@ -11,3 +11,2 @@ "typings": "./dist/markademic.d.ts", | ||
"build:publish": "npm run build:develop && npm run build:production", | ||
"publish": "npm run build:publish && npm publish", | ||
"test": "ava", | ||
@@ -14,0 +13,0 @@ "coverage": "ava && codecov", |
# markademic | ||
![Release][release-img] | ||
[![Npm Package][npm-img]][npm-url] | ||
[![License][license-img]][license-url] | ||
@@ -5,0 +5,0 @@ [![Dependency Status][david-img]][david-url] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12761
101