@@ -602,7 +602,11 @@ function ConvertFrom-YamlSuiteEventText {
602602 }
603603 $parts = [System.Collections.Generic.List [string ]]::new()
604604 $parts.Add ($prefix )
605- if ($tag -and $tag -ne ' !' ) { $parts.Add (" tag=$tag " ) }
605+ if ($tag -eq ' !' ) {
606+ $parts.Add (' nonSpecificTag=true' )
607+ } elseif ($tag ) {
608+ $parts.Add (" tag=$tag " )
609+ }
606610 if ($anchorToken ) { $parts.Add (" anchor=$anchorToken " ) }
607611 if ($prefix -eq ' =VAL' ) { $parts.Add (" value=$value " ) }
608612 $canonical.Add (($parts -join ' |' ))
@@ -684,7 +688,11 @@ function ConvertTo-YamlSuiteActualEvent {
684688 if ($node.Kind -eq ' Scalar' ) {
685689 $parts = [System.Collections.Generic.List [string ]]::new()
686690 $parts.Add (' =VAL' )
687- if ($node.Tag -and $node.Tag -ne ' !' ) { $parts.Add (" tag=$ ( $node.Tag ) " ) }
691+ if ([string ]::IsNullOrEmpty($node.Tag ) -and $node.HasUnknownTag ) {
692+ $parts.Add (' nonSpecificTag=true' )
693+ } elseif ($node.Tag ) {
694+ $parts.Add (" tag=$ ( $node.Tag ) " )
695+ }
688696 if ($node.Anchor ) {
689697 $parts.Add (" anchor=$ (
690698 Get-YamlSuiteAnchorToken - Key (' id:{0}' -f $node.Id ) - AnchorMap $anchorMap `
@@ -701,7 +709,11 @@ function ConvertTo-YamlSuiteActualEvent {
701709 $startParts = [System.Collections.Generic.List [string ]]::new()
702710 $startToken = if ($node.Kind -eq ' Sequence' ) { ' +SEQ' } else { ' +MAP' }
703711 $startParts.Add ($startToken )
704- if ($node.Tag -and $node.Tag -ne ' !' ) { $startParts.Add (" tag=$ ( $node.Tag ) " ) }
712+ if ([string ]::IsNullOrEmpty($node.Tag ) -and $node.HasUnknownTag ) {
713+ $startParts.Add (' nonSpecificTag=true' )
714+ } elseif ($node.Tag ) {
715+ $startParts.Add (" tag=$ ( $node.Tag ) " )
716+ }
705717 if ($node.Anchor ) {
706718 $startParts.Add (" anchor=$ (
707719 Get-YamlSuiteAnchorToken - Key (' id:{0}' -f $node.Id ) - AnchorMap $anchorMap `
0 commit comments