Skip to content

Commit 93c0f4a

Browse files
committed
Lint/prettify
1 parent e33d393 commit 93c0f4a

File tree

5 files changed

+25
-20
lines changed

5 files changed

+25
-20
lines changed

bin/md2gslides.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var parser = new ArgumentParser({
4040

4141
parser.addArgument('file', {
4242
help: 'Path to markdown file to convert, If omitted, reads from stdin',
43-
nargs: '?'
43+
nargs: '?',
4444
});
4545
parser.addArgument(['-u', '--user'], {
4646
help: 'Email address of user',

src/parser/extract_slides.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ inlineTokenRules['html_inline'] = (token, context) => {
140140
// Depending on spacing, comment blocks
141141
// sometimes appear as inline elements
142142
fullTokenRules['html_block'](token, context);
143-
return
143+
return;
144144
default:
145145
throw new Error('Unsupported inline HTML element: ' + node.nodeName);
146146
}

test/extract_slides.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ describe('extractSlides', function() {
115115
const slides = extractSlides(markdown);
116116

117117
it('should have a background image', function() {
118-
return expect(slides).to.have.nested.property('[0].bodies[0].images[0].url', 'https://example.com/image.jpg');
118+
return expect(slides).to.have.nested.property(
119+
'[0].bodies[0].images[0].url',
120+
'https://example.com/image.jpg',
121+
);
119122
});
120123

121124
it('should have an image x offset', function() {
@@ -366,7 +369,10 @@ describe('extractSlides', function() {
366369
});
367370

368371
it('should have the correct style', function() {
369-
return expect(slides).to.have.nested.property('[0].bodies[0].text.textRuns[0].baselineOffset', 'SUPERSCRIPT');
372+
return expect(slides).to.have.nested.property(
373+
'[0].bodies[0].text.textRuns[0].baselineOffset',
374+
'SUPERSCRIPT',
375+
);
370376
});
371377
});
372378

test/generic_layout.spec.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ describe('GenericLayout', function() {
110110
textRuns: [],
111111
listMarkers: [],
112112
big: false,
113-
},
113+
},
114114
},
115115
],
116116
tables: [],
@@ -156,15 +156,15 @@ describe('GenericLayout', function() {
156156
rawText: 'This is the left column\n',
157157
textRuns: [],
158158
listMarkers: [],
159-
}
159+
},
160160
},
161161
{
162162
text: {
163163
big: false,
164164
rawText: 'This is the right column\n',
165165
textRuns: [],
166166
listMarkers: [],
167-
}
167+
},
168168
},
169169
],
170170
tables: [],
@@ -214,7 +214,7 @@ describe('GenericLayout', function() {
214214
rawText: '\n',
215215
textRuns: [],
216216
listMarkers: [],
217-
}
217+
},
218218
},
219219
],
220220
tables: [],
@@ -259,9 +259,9 @@ describe('GenericLayout', function() {
259259
width: 350,
260260
height: 315,
261261
},
262-
],
263-
}
264-
]
262+
],
263+
},
264+
],
265265
};
266266
const layout = new GenericLayout('', presentation, input);
267267
layout.appendContentRequests(requests);
@@ -301,10 +301,9 @@ describe('GenericLayout', function() {
301301
},
302302
],
303303
images: [],
304-
}
304+
},
305305
],
306306
tables: [],
307-
308307
};
309308
const layout = new GenericLayout('', presentation, input);
310309
layout.appendContentRequests(requests);
@@ -497,7 +496,7 @@ describe('GenericLayout', function() {
497496
},
498497
],
499498
},
500-
}
499+
},
501500
],
502501
tables: [],
503502
};

test/match_layout.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('matchLayout', function() {
6161
{
6262
title: { rawText: 'title' },
6363
subtitle: { rawText: 'subtitle' },
64-
bodies: [{ text: {rawText: 'body' }}],
64+
bodies: [{ text: { rawText: 'body' } }],
6565
tables: [],
6666
},
6767
],
@@ -70,7 +70,7 @@ describe('matchLayout', function() {
7070
{
7171
title: { rawText: 'title', big: true },
7272
subtitle: null,
73-
bodies: [{ text: {rawText: 'body' }}],
73+
bodies: [{ text: { rawText: 'body' } }],
7474
tables: [],
7575
},
7676
],
@@ -79,7 +79,7 @@ describe('matchLayout', function() {
7979
{
8080
title: { rawText: 'title' },
8181
subtitle: null,
82-
bodies: [{ text: { rawText: 'column1' }}, { text: { rawText: 'column2' }}],
82+
bodies: [{ text: { rawText: 'column1' } }, { text: { rawText: 'column2' } }],
8383
tables: [],
8484
},
8585
],
@@ -88,7 +88,7 @@ describe('matchLayout', function() {
8888
{
8989
title: { rawText: 'title' },
9090
subtitle: null,
91-
bodies: [{ text: { rawText: 'body' }}],
91+
bodies: [{ text: { rawText: 'body' } }],
9292
tables: [],
9393
images: [],
9494
videos: [],
@@ -99,7 +99,7 @@ describe('matchLayout', function() {
9999
{
100100
title: { rawText: 'title' },
101101
subtitle: null,
102-
bodies: [{ images: [{ url: 'https://source.unsplash.com/78A265wPiO4/1600x900', padding: 0 }]}],
102+
bodies: [{ images: [{ url: 'https://source.unsplash.com/78A265wPiO4/1600x900', padding: 0 }] }],
103103
tables: [],
104104
},
105105
],
@@ -117,7 +117,7 @@ describe('matchLayout', function() {
117117
{
118118
title: null,
119119
subtitle: null,
120-
bodies: [{ images: [{ url: 'https://source.unsplash.com/78A265wPiO4/1600x900', padding: 0 }]}],
120+
bodies: [{ images: [{ url: 'https://source.unsplash.com/78A265wPiO4/1600x900', padding: 0 }] }],
121121
tables: [],
122122
videos: [],
123123
},

0 commit comments

Comments
 (0)