Skip to content

Commit

Permalink
GEDCOM: Update tag to record (#3386)
Browse files Browse the repository at this point in the history
Update `tag` to `record` (GEDCOM 5.5.5 spec terminology update)
  • Loading branch information
hoonweiting authored Mar 13, 2022
1 parent 61c460e commit f8f9534
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions components/prism-gedcom.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ Prism.languages.gedcom = {
}
}
},
'tag': {
'record': {
// Preceded by level and optional pointer
pattern: /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,
lookbehind: true,
alias: 'string'
alias: 'tag'
},
'level': {
pattern: /(^[\t ]*)\d+/m,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-gedcom.min.js

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

8 changes: 4 additions & 4 deletions tests/languages/gedcom/level_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

[
["level", "0"],
["tag", "HEAD"],
["record", "HEAD"],
["level", "1"],
["tag", "CHAR"],
["record", "CHAR"],
["line-value", ["ASCII"]],
["level", "99"],
["tag", "FOO"],
["record", "FOO"],
["line-value", ["bar"]]
]

----------------------------------------------------

Checks for levels.
Checks for levels.
12 changes: 6 additions & 6 deletions tests/languages/gedcom/line-value_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@

[
["level", "1"],
["tag", "CHIL"],
["record", "CHIL"],
["line-value", [["pointer", "@CHILD1@"]]],
["level", "2"],
["tag", "PLAC"],
["record", "PLAC"],
["line-value", ["ÁĆÉǴÍ,ḰĹḾŃÓ,ṔŔŚÚẂ,ÝŹáćé,ǵíḱĺḿ,ńóṕŕś,úẃýź"]],
["level", "1"],
["tag", "NAME"],
["record", "NAME"],
["line-value", ["code: 0313/COMMA ABOVE/"]],
["level", "2"],
["tag", "DATE"],
["record", "DATE"],
["line-value", ["@#DGREGORIAN@ 31 DEC 1997"]],
["level", "2"],
["tag", "CONT"],
["record", "CONT"],
["line-value", ["Copyright gedcom@@gedcom.org"]]
]

----------------------------------------------------

Checks for line values.
Checks for line values.
6 changes: 3 additions & 3 deletions tests/languages/gedcom/pointer_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
["pointer", "@_$!\"$%&'()*+,-./:;<=>?[\\]^`{|}~ #foobar@"],
["level", "0"],
["pointer", "@SUBMITTER@"],
["tag", "SUBM"],
["record", "SUBM"],
["level", "1"],
["tag", "FAMS"],
["record", "FAMS"],
["line-value", [["pointer", "@FAMILY@"]]]
]

----------------------------------------------------

Checks for pointers.
Checks for pointers.
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
0 HEAD
1 foo_bar
2 _
3 @pointer@ _Sometag42
4 247
----------------------------------------------------
[
["level", "0"],
["tag", "HEAD"],
["level", "1"],
["tag", "foo_bar"],
["level", "2"],
["tag", "_"],
["level", "3"],
["pointer", "@pointer@"],
["tag", "_Sometag42"],
["level", "4"],
["tag", "247"]
]
----------------------------------------------------
Checks for tags.
0 HEAD
1 foo_bar
2 _
3 @pointer@ _Sometag42
4 247

----------------------------------------------------

[
["level", "0"],
["record", "HEAD"],
["level", "1"],
["record", "foo_bar"],
["level", "2"],
["record", "_"],
["level", "3"],
["pointer", "@pointer@"],
["record", "_Sometag42"],
["level", "4"],
["record", "247"]
]

----------------------------------------------------

Checks for records.

0 comments on commit f8f9534

Please sign in to comment.