Skip to content

Commit

Permalink
feat(path): Whitespace except 0x20 should be ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Mar 13, 2019
1 parent 6dd6658 commit 31323b6
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
6 changes: 3 additions & 3 deletions dist/vue-i18n.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ pathStateMachine[IN_IDENT] = {
'ident': [IN_IDENT, APPEND],
'0': [IN_IDENT, APPEND],
'number': [IN_IDENT, APPEND],
'ws': [IN_PATH, PUSH],
'ws': [IN_IDENT],
'.': [BEFORE_IDENT, PUSH],
'[': [IN_SUB_PATH, PUSH],
'eof': [AFTER_PATH, PUSH]
Expand Down Expand Up @@ -749,7 +749,6 @@ function getPathCharType (ch) {
case 0x2D: // -
return 'ident'

case 0x20: // Space
case 0x09: // Tab
case 0x0A: // Newline
case 0x0D: // Return
Expand Down Expand Up @@ -781,7 +780,8 @@ function formatSubPath (path) {
* Parse a string path into an array of segments
*/

function parse$1 (path) {
function
parse$1 (path) {
var keys = [];
var index = -1;
var mode = BEFORE_PATH;
Expand Down
6 changes: 3 additions & 3 deletions dist/vue-i18n.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ pathStateMachine[IN_IDENT] = {
'ident': [IN_IDENT, APPEND],
'0': [IN_IDENT, APPEND],
'number': [IN_IDENT, APPEND],
'ws': [IN_PATH, PUSH],
'ws': [IN_IDENT],
'.': [BEFORE_IDENT, PUSH],
'[': [IN_SUB_PATH, PUSH],
'eof': [AFTER_PATH, PUSH]
Expand Down Expand Up @@ -747,7 +747,6 @@ function getPathCharType (ch) {
case 0x2D: // -
return 'ident'

case 0x20: // Space
case 0x09: // Tab
case 0x0A: // Newline
case 0x0D: // Return
Expand Down Expand Up @@ -779,7 +778,8 @@ function formatSubPath (path) {
* Parse a string path into an array of segments
*/

function parse$1 (path) {
function
parse$1 (path) {
var keys = [];
var index = -1;
var mode = BEFORE_PATH;
Expand Down
6 changes: 3 additions & 3 deletions dist/vue-i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@
'ident': [IN_IDENT, APPEND],
'0': [IN_IDENT, APPEND],
'number': [IN_IDENT, APPEND],
'ws': [IN_PATH, PUSH],
'ws': [IN_IDENT],
'.': [BEFORE_IDENT, PUSH],
'[': [IN_SUB_PATH, PUSH],
'eof': [AFTER_PATH, PUSH]
Expand Down Expand Up @@ -753,7 +753,6 @@
case 0x2D: // -
return 'ident'

case 0x20: // Space
case 0x09: // Tab
case 0x0A: // Newline
case 0x0D: // Return
Expand Down Expand Up @@ -785,7 +784,8 @@
* Parse a string path into an array of segments
*/

function parse$1 (path) {
function
parse$1 (path) {
var keys = [];
var index = -1;
var mode = BEFORE_PATH;
Expand Down
Loading

0 comments on commit 31323b6

Please sign in to comment.