Skip to content

Commit

Permalink
since dots arte often left out for paragrapgs in Malti, make them opt…
Browse files Browse the repository at this point in the history
…ional in the regex
  • Loading branch information
yetzt committed Feb 24, 2013
1 parent f526abe commit 4653f15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions eurlex.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,12 @@ var _parse = function(_data, callback) {
/* next */
continue;
}

// thats it with the easy part. now wish me luck.

/* match for paragraph */
if (item.match(/^([0-9]+)\. /)) {
_item = item.match(/^([0-9]+)\. (.*)$/);
if (item.match(/^([0-9]+)(\.)? /)) {
_item = item.match(/^([0-9]+)(\.)? (.*)$/);
if (!_item) throw new Error('Parser stopped on Paragraph: '+item);
paragraph_number++;
point_number = 0;
Expand All @@ -373,7 +373,7 @@ var _parse = function(_data, callback) {
"id": "a"+article_number.toString()+"p"+paragraph_number.toString(),
"type": "paragraph",
"literal": _item[1],
"text": _item[2]
"text": _item[3]
});
if (argv.v && !argv.q) console.error(('P'+paragraph_number).pad().inverse.bold.cyan, _item[2]);
/* next */
Expand Down

0 comments on commit 4653f15

Please sign in to comment.