Skip to content

Commit

Permalink
Fix with @evilz/markdown-it-attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
evilz committed Sep 21, 2019
1 parent e8a9104 commit 7dd5fe4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# vscode-reveal [![](https://img.shields.io/badge/Version-3.4-blue.svg)](https://marketplace.visualstudio.com/items?itemName=evilz.vscode-reveal)
# vscode-reveal [![](https://img.shields.io/badge/Version-4.0.1-blue.svg)](https://marketplace.visualstudio.com/items?itemName=evilz.vscode-reveal)

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=evilz_vscode-reveal&metric=alert_status)](https://sonarcloud.io/dashboard?id=evilz_vscode-reveal)
[![Azure Pipeline](https://evilz.visualstudio.com/vscode-reveal/_apis/build/status/2)](https://evilz.visualstudio.com/vscode-reveal/_build?definitionId=2)
Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-reveal",
"displayName": "vscode-reveal",
"description": "Show markdown as revealJs presentation",
"version": "4.0.0",
"version": "4.0.1",
"publisher": "evilz",
"author": "Vincent Bourdon",
"license": "MIT",
Expand Down Expand Up @@ -369,15 +369,15 @@
"all": true
},
"dependencies": {
"@evilz/markdown-it-attrs": "^3.0.1",
"fs-jetpack": "^2.2.2",
"gray-matter": "^4.0.2",
"koa": "^2.8.1",
"koa-ejs": "^4.2.0",
"koa-logger": "^3.2.1",
"koa-router": "^7.4.0",
"koa-static": "^5.0.0",
"markdown-it": "^9.0.0",
"markdown-it-attrs": "^3.0.1",
"markdown-it": "^10.0.0",
"markdown-it-block-embed": "0.0.3",
"markdown-it-container": "^2.0.0",
"markdown-it-github-headings": "^1.1.1",
Expand Down
1 change: 1 addition & 0 deletions src/Container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default class Container {
this.editorContext = null

this.server = new RevealServer(
this.logger,
() => this.rootDir,
() => this.slides,
() => this.configuration,
Expand Down
2 changes: 1 addition & 1 deletion src/Markdown-it.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


import * as attrs from 'markdown-it-attrs'
import * as attrs from '@evilz/markdown-it-attrs'
import * as blockEmbed from 'markdown-it-block-embed'
import * as container from 'markdown-it-container'
import * as githubHeadings from 'markdown-it-github-headings'
Expand Down
13 changes: 4 additions & 9 deletions src/RevealServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import markdown from './Markdown-it'
import { Configuration } from './Configuration'
import { exportHTML, IExportOptions } from "./ExportHTML";
import { ISlide } from './ISlide';
import { Logger } from './Logger'



Expand All @@ -20,6 +21,7 @@ export class RevealServer {
private readonly host = 'localhost'

constructor(
private readonly logger: Logger,
private readonly getRootDir: () => string,
private readonly getSlides: () => ISlide[],
private readonly getConfiguration: () => Configuration,
Expand Down Expand Up @@ -63,7 +65,7 @@ export class RevealServer {
const app = this.app

// LOG REQUEST
app.use(koalogger())
app.use(koalogger((str, args) => {this.logger.log(str)}))
app.use(this.exportMiddleware(exportHTML, () => this.isInExport()))

// For static media or else
Expand Down Expand Up @@ -98,17 +100,10 @@ export class RevealServer {
const libsPAth = path.join(this.extensionPath, 'libs')
router.get('/libs', koastatic(libsPAth));

// TODO : make middleware
// this.app.get('/markdown.md', (req, res) => {
// res.send(this.getSlideContent())
// })

app.use(router.routes());

// Error Handling
app.on('error', err => {
// todo use logger
console.error('server error', err)
this.logger.error(err)
})

this.server = app.listen();
Expand Down

0 comments on commit 7dd5fe4

Please sign in to comment.