@@ -362,10 +362,16 @@ def yaml_str_helper(pfx, md, width=79):
362362 return pfx + txt
363363
364364def expand_prefix (txt , prefixes ):
365+ global prerelease
365366 for key in sorted (prefixes .keys (), key = lambda x :- len (x )):
366367 k = key + ':'
367368 if txt .startswith (k ):
368- return prefixes [key ] + txt [len (k ):]
369+ uri = prefixes [key ] + txt [len (k ):]
370+ if 'https://gedcom.io/terms/v7.1/' in uri :
371+ prerelease = True
372+ return uri
373+ if 'https://gedcom.io/terms/v7.1/' in txt :
374+ prerelease = True
369375 return txt
370376
371377if __name__ == '__main__' :
@@ -404,6 +410,7 @@ def addpfx(tag):
404410
405411 for tag in g7 :
406412 print ('outputting' , tag , '...' , end = ' ' )
413+ prerelease = False
407414 maybe = join (dirname (specs [0 ]),'terms' ,tag )
408415 if exists (maybe ):
409416 copyfile (maybe , join (dest ,tag ))
@@ -492,6 +499,9 @@ def addpfx(tag):
492499 print ('\n value of:' , file = fh )
493500 is_used_by = True
494501 print (' - "' + expand_prefix (tag2 ,prefixes )+ '"' , file = fh )
502+
503+ if prerelease :
504+ print ('\n prerelease: true' , file = fh )
495505
496506 print ('\n contact: "https://gedcom.io/community/"' , file = fh )
497507 fh .write ('...\n ' )
@@ -520,4 +530,3 @@ def addpfx(tag):
520530 print ('\t ' .join (row ), file = f )
521531 print ('done' )
522532
523- quit (1 ) # prevent next steps in Makefile
0 commit comments