Skip to content

Commit

Permalink
extended ETOPS time search to FPL SUMMARY
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingeek committed Jun 8, 2020
1 parent 1752356 commit ba73a04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flyingeek/lidojs",
"version": "1.2.6",
"version": "1.2.7",
"description": "convert Lido OFP text files",
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
Expand Down
9 changes: 9 additions & 0 deletions src/modules/ofp_infos.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ function ofpInfos(text) {
match = pattern.exec(rawFS);
if (match) {
etopsTime = parseInt(match[1], 10);
} else {
try {
match = pattern.exec('FPL SUMMARY', 'Generated');
if (match) {
etopsTime = parseInt(match[1], 10);
}
} catch (err) {
console.log("ETOPS range not found");
}
}
const etopsSummary = text.extract("ETOPS SUMMARY", "Generated");
pattern = /EEP\((\S{4})\)/u;
Expand Down

0 comments on commit ba73a04

Please sign in to comment.