Skip to content

Commit

Permalink
feat: Support for the logical assignment operator
Browse files Browse the repository at this point in the history
* 

Fixes #1172

* chore: Update test fixture to last release
  • Loading branch information
tmcw authored Dec 1, 2018
1 parent 35c635f commit 58d2a2f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 deletions.
6 changes: 6 additions & 0 deletions __tests__/__snapshots__/bin-readme.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ exports[`readme autodetection of different filenames updates readme.markdown 1`]
### Table of Contents
- [foo](#foo)
- [Parameters](#parameters)
- [bar](#bar)
- [Parameters](#parameters-1)
## foo
Expand Down Expand Up @@ -46,8 +48,10 @@ exports[`readme command --readme-file 1`] = `
### Table of Contents
- [foo](#foo)
- [Parameters](#parameters)
- [bar](#bar)
- [Parameters](#parameters-1)
## foo
Expand Down Expand Up @@ -82,8 +86,10 @@ exports[`readme command updates README.md 1`] = `
### Table of Contents
- [foo](#foo)
- [Parameters](#parameters)
- [bar](#bar)
- [Parameters](#parameters-1)
## foo
Expand Down
12 changes: 12 additions & 0 deletions __tests__/__snapshots__/bin.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1858,27 +1858,35 @@ exports[`build --document-exported 1`] = `
### Table of Contents
- [z][1]
- [zMethod][2]
- [x][3]
- [Parameters][4]
- [Class][5]
- [Parameters][6]
- [classMethod][7]
- [classGetter][8]
- [classSetter][9]
- [Parameters][10]
- [staticMethod][11]
- [staticGetter][12]
- [staticSetter][13]
- [Parameters][14]
- [T5][15]
- [y2Default][16]
- [y4][17]
- [Parameters][18]
- [object][19]
- [method][20]
- [getter][21]
- [setter][22]
- [Parameters][23]
- [prop][24]
- [func][25]
Expand All @@ -1888,12 +1896,16 @@ exports[`build --document-exported 1`] = `
- [T2][29]
- [T4][30]
- [f4][31]
- [Parameters][32]
- [o1][33]
- [om1][34]
- [f5][35]
- [Parameters][36]
- [o2][37]
- [om2][38]
## z
Expand Down
4 changes: 2 additions & 2 deletions __tests__/__snapshots__/test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ exports[`html nested.input.js 1`] = `
<html>
<head>
<meta charset='utf-8' />
<title>-alpha.1 | Documentation</title>
<title> | Documentation</title>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<link href='assets/bass.css' type='text/css' rel='stylesheet' />
<link href='assets/style.css' type='text/css' rel='stylesheet' />
Expand All @@ -1400,7 +1400,7 @@ exports[`html nested.input.js 1`] = `
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
<div class='py1 px2'>
<h3 class='mb0 no-anchor'>documentation</h3>
<div class='mb1'><code>9.0.0-alpha.1</code></div>
<div class='mb1'></div>
<input
placeholder='Filter'
id='filter-input'
Expand Down
4 changes: 2 additions & 2 deletions __tests__/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ describe('html', function() {
.map(r =>
r.contents
.toString()
.replace(/documentation \d+\.\d+\.\d+/g, '')
.replace(/<code>\d+\.\d+\.\d+<\/code>/g, '')
.replace(/documentation \d+\.\d+\.\d+(-\w+(\.\d+)?)?/g, '')
.replace(/<code>\d+\.\d+\.\d+(-\w+(\.\d+)?)?<\/code>/g, '')
)
.join('\n');
expect(clean).toMatchSnapshot();
Expand Down
3 changes: 2 additions & 1 deletion src/parsers/parse_to_ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const opts = {
'functionSent',
'jsx',
'objectRestSpread',
'dynamicImport'
'dynamicImport',
'logicalAssignment'
]
};

Expand Down

0 comments on commit 58d2a2f

Please sign in to comment.