Skip to content

Commit

Permalink
improve marked renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Nov 30, 2017
1 parent 4448351 commit e8a65b0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 169 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -51,9 +51,10 @@
"@types/empower": "^1.2.30",
"@types/es6-promise": "0.0.33",
"@types/he": "^0.5.29",
"@types/highlight.js": "^9.12.1",
"@types/highlight.js": "^9.12.2",
"@types/js-yaml": "^3.9.1",
"@types/katex": "0.5.0",
"@types/marked": "^0.3.0",
"@types/mocha": "^2.2.44",
"@types/mousetrap": "^1.5.34",
"@types/node": "8.0.53",
Expand Down
5 changes: 4 additions & 1 deletion renderer/markdown-preview.ts
Expand Up @@ -41,17 +41,20 @@ marked.setOptions({
}
},

// @ts-ignore: emoji is a dedicated method added by my fork
emoji(name: string) {
return emoji_replacer.replaceOne(name);
},

sanitize: 1,
});

const REGEX_CHECKED_LISTITEM = /^\[x]\s+/;
const REGEX_UNCHECKED_LISTITEM = /^\[ ]\s+/;

class MarkdownRenderer {
public outline: Heading[];
private renderer: MarkedRenderer;
private renderer: marked.Renderer;
private link_id: number;
private tooltips: string;

Expand Down
166 changes: 0 additions & 166 deletions renderer/marked.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion renderer/tsconfig.json
Expand Up @@ -18,7 +18,6 @@
"index.ts",
"keyboard.ts",
"lib.d.ts",
"marked.d.ts",
"lint-message.ts",
"lint-panel.ts",
"markdown-preview.ts",
Expand Down

1 comment on commit e8a65b0

@silviavali
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • [Fix confirmed ]

Please sign in to comment.