1414
1515'use strict' ;
1616
17- const { NS_PREFIX } = require ( './Models' ) ;
17+ const { COMMON_NS_PREFIX } = require ( './Models' ) ;
1818
1919/**
2020 * Converts a commonmark model instance to a markdown string.
@@ -51,11 +51,11 @@ class FromAPVisitor {
5151 let jsonTarget = { } ;
5252
5353 // Revert to CodeBlock
54- jsonTarget . $class = NS_PREFIX + 'CodeBlock' ;
54+ jsonTarget . $class = COMMON_NS_PREFIX + 'CodeBlock' ;
5555
5656 // Get the content
5757 const clauseJson = parameters . serializer . toJSON ( thing ) ;
58- jsonSource . $class = NS_PREFIX + 'Document' ;
58+ jsonSource . $class = COMMON_NS_PREFIX + 'Document' ;
5959 jsonSource . xmlns = 'http://commonmark.org/xml/1.0' ;
6060 jsonSource . nodes = clauseJson . nodes ;
6161
@@ -66,21 +66,21 @@ class FromAPVisitor {
6666
6767 // Create the proper tag
6868 let tag = { } ;
69- tag . $class = NS_PREFIX + 'TagInfo' ;
69+ tag . $class = COMMON_NS_PREFIX + 'TagInfo' ;
7070 tag . tagName = 'clause' ;
7171 tag . attributeString = attributeString ;
7272 tag . content = content ;
7373 tag . closed = false ;
7474 tag . attributes = [ ] ;
7575
7676 let attribute1 = { } ;
77- attribute1 . $class = NS_PREFIX + 'Attribute' ;
77+ attribute1 . $class = COMMON_NS_PREFIX + 'Attribute' ;
7878 attribute1 . name = 'src' ;
7979 attribute1 . value = clauseJson . src ;
8080 tag . attributes . push ( attribute1 ) ;
8181
8282 let attribute2 = { } ;
83- attribute2 . $class = NS_PREFIX + 'Attribute' ;
83+ attribute2 . $class = COMMON_NS_PREFIX + 'Attribute' ;
8484 attribute2 . name = 'clauseid' ;
8585 attribute2 . value = clauseJson . clauseid ;
8686 tag . attributes . push ( attribute2 ) ;
@@ -100,7 +100,7 @@ class FromAPVisitor {
100100 break ;
101101 case 'Variable' : {
102102 // Revert to HtmlInline
103- thing . $classDeclaration = parameters . modelManager . getType ( NS_PREFIX + 'HtmlInline' ) ;
103+ thing . $classDeclaration = parameters . modelManager . getType ( COMMON_NS_PREFIX + 'HtmlInline' ) ;
104104
105105 // Create the text for that document
106106 const content = '' ;
@@ -109,21 +109,21 @@ class FromAPVisitor {
109109
110110 // Create the proper tag
111111 let tag = { } ;
112- tag . $class = NS_PREFIX + 'TagInfo' ;
112+ tag . $class = COMMON_NS_PREFIX + 'TagInfo' ;
113113 tag . tagName = 'variable' ;
114114 tag . attributeString = attributeString ;
115115 tag . content = content ;
116116 tag . closed = true ;
117117 tag . attributes = [ ] ;
118118
119119 let attribute1 = { } ;
120- attribute1 . $class = NS_PREFIX + 'Attribute' ;
120+ attribute1 . $class = COMMON_NS_PREFIX + 'Attribute' ;
121121 attribute1 . name = 'id' ;
122122 attribute1 . value = thing . id ;
123123 tag . attributes . push ( attribute1 ) ;
124124
125125 let attribute2 = { } ;
126- attribute2 . $class = NS_PREFIX + 'Attribute' ;
126+ attribute2 . $class = COMMON_NS_PREFIX + 'Attribute' ;
127127 attribute2 . name = 'value' ;
128128 attribute2 . value = thing . value ;
129129 tag . attributes . push ( attribute2 ) ;
@@ -136,7 +136,7 @@ class FromAPVisitor {
136136 break ;
137137 case 'ComputedVariable' : {
138138 // Revert to HtmlInline
139- thing . $classDeclaration = parameters . modelManager . getType ( NS_PREFIX + 'HtmlInline' ) ;
139+ thing . $classDeclaration = parameters . modelManager . getType ( COMMON_NS_PREFIX + 'HtmlInline' ) ;
140140
141141 // Create the text for that document
142142 const content = '' ;
@@ -145,15 +145,15 @@ class FromAPVisitor {
145145
146146 // Create the proper tag
147147 let tag = { } ;
148- tag . $class = NS_PREFIX + 'TagInfo' ;
148+ tag . $class = COMMON_NS_PREFIX + 'TagInfo' ;
149149 tag . tagName = 'computed' ;
150150 tag . attributeString = attributeString ;
151151 tag . content = content ;
152152 tag . closed = true ;
153153 tag . attributes = [ ] ;
154154
155155 let attribute1 = { } ;
156- attribute1 . $class = NS_PREFIX + 'Attribute' ;
156+ attribute1 . $class = COMMON_NS_PREFIX + 'Attribute' ;
157157 attribute1 . name = 'value' ;
158158 attribute1 . value = thing . value ;
159159 tag . attributes . push ( attribute1 ) ;
0 commit comments