Skip to content

Commit

Permalink
Terrain50.Validate: Allow 'e' in data lines
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrl committed Oct 2, 2020
1 parent d9e85c2 commit aee64dc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ npm install --save terrain50

-----

## v1.8.3
- Allow the character `e` when validating with `Terrain50.Validate(string)` to allow for very small numbers


## v1.8.2
- Add new `quiet` argument to `Terrain50.AnalyseFrequencies()`
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "terrain50",
"version": "1.8.2",
"version": "1.8.3",
"description": "Library for parsing Ordnance Survey Digital Elevation Model files",
"main": "src/index.mjs",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/static/Terrain50Validate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function terrain50_validate(str) {

let parts = line.split(/\s+/);

if(line.search(/^[0-9-.]+\s+/) !== -1) {
if(line.search(/^[0-9-.e]+\s+/) !== -1) {
// It's a data line
if(col_count === null) col_count = parts.length;
if(!col_counts_seen.includes(parts.length))
Expand Down

0 comments on commit aee64dc

Please sign in to comment.