-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
11 changed files
with
183 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Prism.languages.gedcom = { | ||
'line-value': { | ||
// Preceded by level, optional pointer, and tag | ||
pattern: /(^\s*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ +).+/m, | ||
lookbehind: true, | ||
inside: { | ||
'pointer': { | ||
pattern: /^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/, | ||
alias: 'variable' | ||
} | ||
} | ||
}, | ||
'tag': { | ||
// Preceded by level and optional pointer | ||
pattern: /(^\s*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m, | ||
lookbehind: true, | ||
alias: 'string' | ||
}, | ||
'level': { | ||
pattern: /(^\s*)\d+/m, | ||
lookbehind: true, | ||
alias: 'number' | ||
}, | ||
'pointer': { | ||
pattern: /@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/, | ||
alias: 'variable' | ||
} | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<h2>Full example</h2> | ||
<pre><code>0 HEAD | ||
1 CHAR ASCII | ||
1 SOUR ID_OF_CREATING_FILE | ||
1 GEDC | ||
2 VERS 5.5 | ||
2 FORM Lineage-Linked | ||
1 SUBM @SUBMITTER@ | ||
0 @SUBMITTER@ SUBM | ||
1 NAME /Submitter/ | ||
1 ADDR Submitters address | ||
2 CONT address continued here | ||
0 @FATHER@ INDI | ||
1 NAME /Father/ | ||
1 SEX M | ||
1 BIRT | ||
2 PLAC birth place | ||
2 DATE 1 JAN 1899 | ||
1 DEAT | ||
2 PLAC death place | ||
2 DATE 31 DEC 1990 | ||
1 FAMS @FAMILY@ | ||
0 @MOTHER@ INDI | ||
1 NAME /Mother/ | ||
1 SEX F | ||
1 BIRT | ||
2 PLAC birth place | ||
2 DATE 1 JAN 1899 | ||
1 DEAT | ||
2 PLAC death place | ||
2 DATE 31 DEC 1990 | ||
1 FAMS @FAMILY@ | ||
0 @CHILD@ INDI | ||
1 NAME /Child/ | ||
1 BIRT | ||
2 PLAC birth place | ||
2 DATE 31 JUL 1950 | ||
1 DEAT | ||
2 PLAC death place | ||
2 DATE 29 FEB 2000 | ||
1 FAMC @FAMILY@ | ||
0 @FAMILY@ FAM | ||
1 MARR | ||
2 PLAC marriage place | ||
2 DATE 1 APR 1950 | ||
1 HUSB @FATHER@ | ||
1 WIFE @MOTHER@ | ||
1 CHIL @CHILD@ | ||
0 TRLR | ||
</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
0 HEAD | ||
1 CHAR ASCII | ||
99 FOO bar | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["level", "0"], | ||
["tag", "HEAD"], | ||
["level", "1"], | ||
["tag", "CHAR"], | ||
["line-value", ["ASCII"]], | ||
["level", "99"], | ||
["tag", "FOO"], | ||
["line-value", ["bar"]] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for levels. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
1 CHIL @CHILD1@ | ||
2 PLAC ÁĆÉǴÍ,ḰĹḾŃÓ,ṔŔŚÚẂ,ÝŹáćé,ǵíḱĺḿ,ńóṕŕś,úẃýź | ||
1 NAME code: 0313/COMMA ABOVE/ | ||
2 DATE @#DGREGORIAN@ 31 DEC 1997 | ||
2 CONT Copyright gedcom@@gedcom.org | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["level", "1"], | ||
["tag", "CHIL"], | ||
["line-value", [["pointer", "@CHILD1@"]]], | ||
["level", "2"], | ||
["tag", "PLAC"], | ||
["line-value", ["ÁĆÉǴÍ,ḰĹḾŃÓ,ṔŔŚÚẂ,ÝŹáćé,ǵíḱĺḿ,ńóṕŕś,úẃýź"]], | ||
["level", "1"], | ||
["tag", "NAME"], | ||
["line-value", ["code: 0313/COMMA ABOVE/"]], | ||
["level", "2"], | ||
["tag", "DATE"], | ||
["line-value", ["@#DGREGORIAN@ 31 DEC 1997"]], | ||
["level", "2"], | ||
["tag", "CONT"], | ||
["line-value", ["Copyright gedcom@@gedcom.org"]] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for line values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@f!@ | ||
@foo_Bar@ | ||
@_$!"$%&'()*+,-./:;<=>?[\]^`{|}~ #foobar@ | ||
0 @SUBMITTER@ SUBM | ||
1 FAMS @FAMILY@ | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["pointer", "@f!@"], | ||
["pointer", "@foo_Bar@"], | ||
["pointer", "@_$!\"$%&'()*+,-./:;<=>?[\\]^`{|}~ #foobar@"], | ||
["level", "0"], | ||
["pointer", "@SUBMITTER@"], | ||
["tag", "SUBM"], | ||
["level", "1"], | ||
["tag", "FAMS"], | ||
["line-value", [["pointer", "@FAMILY@"]]] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for pointers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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. |