pubid 2.0.0.pre.alpha.22 → 2.0.0.pre.alpha.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/parg/ieee.json +1 -1
- data/lib/pubid/ieee/parser.rb +0 -21
- data/lib/pubid/version.rb +1 -1
- metadata +1 -1
data/lib/pubid/ieee/parser.rb
CHANGED
|
@@ -1488,23 +1488,10 @@ module Pubid
|
|
|
1488
1488
|
# which standards are actually IEEE-related.
|
|
1489
1489
|
# ISO-only standards are still filtered as they have separate handling.
|
|
1490
1490
|
|
|
1491
|
-
# Pattern 3: Replace underscore before ISO stage codes with slash
|
|
1492
|
-
# These are joint development drafts that use underscore instead of slash
|
|
1493
|
-
cleaned = cleaned.gsub(/_(FDIS|CDV|CD|DIS|WD|PWI|NP)/, '/\1')
|
|
1494
|
-
|
|
1495
1491
|
# NEW: Normalize multiple spaces to single space
|
|
1496
1492
|
# No valid IEEE identifier pattern needs more than 1 space
|
|
1497
1493
|
cleaned = cleaned.gsub(/\s+/, " ")
|
|
1498
1494
|
|
|
1499
|
-
# A joint ISO-led publisher list is sometimes crawled with a stray slash
|
|
1500
|
-
# (or slash+space) before the ISO stage code — "ISO/IEC/IEEE/ FDIS …" or
|
|
1501
|
-
# "ISO/IEC/IEEE/FDIS …". Restore the space separator so the stage parses
|
|
1502
|
-
# (bucket 7).
|
|
1503
|
-
cleaned = cleaned.gsub(
|
|
1504
|
-
%r{\b(ISO/IEC/IEEE|IEEE/ISO/IEC|IEEE/IEC/ISO|ISO/IEEE|IEC/IEEE|IEEE/IEC|ISO/IEC)/ ?(FDIS|FCD|CDV|DIS\d?|CD\d?|WD|PWI|NP)\b},
|
|
1505
|
-
'\1 \2',
|
|
1506
|
-
)
|
|
1507
|
-
|
|
1508
1495
|
# Rewrite the rawbib revision-notation dialects (REVa/REVd/glued) into
|
|
1509
1496
|
# the canonical /R-<x> form before the suffix normalization below.
|
|
1510
1497
|
cleaned = normalize_revision_notation(cleaned)
|
|
@@ -1520,17 +1507,9 @@ module Pubid
|
|
|
1520
1507
|
cleaned = cleaned.gsub(/(\d)\s+-(\d{4})\b/, '\1-\2') # "C37.101 -2006" → "C37.101-2006"
|
|
1521
1508
|
cleaned = cleaned.gsub(/(\d)-\s+(\d{4})\b/, '\1-\2') # "C62.35- 2010" → "C62.35-2010"
|
|
1522
1509
|
|
|
1523
|
-
# NEW Session 171: HTML entity for en dash (–)
|
|
1524
|
-
# ONLY convert if not already followed by a dash (avoid creating --)
|
|
1525
|
-
cleaned = cleaned.gsub(/–(?!-)/, "-") # En dash → regular hyphen (if not followed by dash)
|
|
1526
|
-
cleaned = cleaned.gsub("–-", "-") # En-dash-dash → single dash
|
|
1527
|
-
|
|
1528
1510
|
# NEW Session 171: Remove wrong ! prefix
|
|
1529
1511
|
cleaned = cleaned.gsub(/^!IEEE /, "IEEE ")
|
|
1530
1512
|
|
|
1531
|
-
# NEW Session 171: Fix "IEEE/ ASTM" spacing (extra space after slash)
|
|
1532
|
-
cleaned = cleaned.gsub("IEEE/ ASTM", "IEEE/ASTM")
|
|
1533
|
-
|
|
1534
1513
|
# NEW Phase 1: Handle HTML entities comprehensively
|
|
1535
1514
|
cleaned = cleaned.gsub("™", "™") # Trademark symbol
|
|
1536
1515
|
cleaned = cleaned.gsub("’", "'") # Smart apostrophe
|
data/lib/pubid/version.rb
CHANGED