@@ -13,7 +13,7 @@ module.exports = wrapper
1313
1414var own = { } . hasOwnProperty
1515
16- /* Handlers. */
16+ // Handlers.
1717var map = {
1818 '#document' : root ,
1919 '#document-fragment' : root ,
@@ -22,7 +22,7 @@ var map = {
2222 '#documentType' : doctype
2323}
2424
25- /* Wrapper to normalise options. */
25+ // Wrapper to normalise options.
2626function wrapper ( ast , options ) {
2727 var settings = options || { }
2828 var file
@@ -42,7 +42,7 @@ function wrapper(ast, options) {
4242 } )
4343}
4444
45- /* Transform a node. */
45+ // Transform a node.
4646function transform ( ast , config ) {
4747 var schema = config . schema
4848 var fn = own . call ( map , ast . nodeName ) ? map [ ast . nodeName ] : element
@@ -74,7 +74,7 @@ function transform(ast, config) {
7474 return node
7575}
7676
77- /* Transform children. */
77+ // Transform children.
7878function nodes ( children , config ) {
7979 var length = children . length
8080 var index = - 1
@@ -87,8 +87,8 @@ function nodes(children, config) {
8787 return result
8888}
8989
90- /* Transform a document.
91- * Stores `ast.quirksMode` in `node.data.quirksMode`. */
90+ // Transform a document.
91+ // Stores `ast.quirksMode` in `node.data.quirksMode`.
9292function root ( ast , children , config ) {
9393 var node = { type : 'root' , children : children , data : { } }
9494 var doc
@@ -111,7 +111,7 @@ function root(ast, children, config) {
111111 return node
112112}
113113
114- /* Transform a doctype. */
114+ // Transform a doctype.
115115function doctype ( ast ) {
116116 return {
117117 type : 'doctype' ,
@@ -121,17 +121,17 @@ function doctype(ast) {
121121 }
122122}
123123
124- /* Transform a text. */
124+ // Transform a text.
125125function text ( ast ) {
126126 return { type : 'text' , value : ast . value }
127127}
128128
129- /* Transform a comment. */
129+ // Transform a comment.
130130function comment ( ast ) {
131131 return { type : 'comment' , value : ast . data }
132132}
133133
134- /* Transform an element. */
134+ // Transform an element.
135135function element ( ast , children , config ) {
136136 var fn = config . schema . space === 'svg' ? s : h
137137 var name = ast . tagName
@@ -169,7 +169,7 @@ function element(ast, children, config) {
169169 return node
170170}
171171
172- /* Create clean positional information. */
172+ // Create clean positional information.
173173function location ( node , location , config ) {
174174 var schema = config . schema
175175 var verbose = config . verbose
@@ -183,7 +183,8 @@ function location(node, location, config) {
183183 if ( node . type === 'element' ) {
184184 reference = node . children [ node . children . length - 1 ]
185185
186- /* Unclosed with children (upstream: https://github.com/inikulin/parse5/issues/109) */
186+ // Bug for unclosed with children.
187+ // See: <https://github.com/inikulin/parse5/issues/109>.
187188 if (
188189 ! location . endTag &&
189190 reference &&
0 commit comments