99
1010import { findSelectedOptions } from '../util/find-selected-options.js'
1111import { resolve } from '../util/resolve.js'
12- import { wrapText } from '../util/wrap-text.js'
1312
1413const defaultChecked = '[x]'
1514const defaultUnchecked = '[ ]'
@@ -39,12 +38,9 @@ export function input(state, node) {
3938 /** @type {Text } */
4039 const result = {
4140 type : 'text' ,
42- value : wrapText (
43- state ,
44- properties . checked
45- ? state . options . checked || defaultChecked
46- : state . options . unchecked || defaultUnchecked
47- )
41+ value : properties . checked
42+ ? state . options . checked || defaultChecked
43+ : state . options . unchecked || defaultUnchecked
4844 }
4945 state . patch ( node , result )
5046 return result
@@ -58,8 +54,8 @@ export function input(state, node) {
5854 const result = {
5955 type : 'image' ,
6056 url : resolve ( state , String ( properties . src || '' ) || null ) ,
61- title : wrapText ( state , String ( properties . title || '' ) ) || null ,
62- alt : wrapText ( state , String ( alt ) )
57+ title : String ( properties . title || '' ) || null ,
58+ alt : String ( alt )
6359 }
6460 state . patch ( node , result )
6561 return result
@@ -111,13 +107,8 @@ export function input(state, node) {
111107 const result = {
112108 type : 'link' ,
113109 title : null ,
114- url : wrapText (
115- state ,
116- properties . type === 'email' ? 'mailto:' + value : value
117- ) ,
118- children : [
119- { type : 'text' , value : wrapText ( state , values [ index ] [ 1 ] || value ) }
120- ]
110+ url : properties . type === 'email' ? 'mailto:' + value : value ,
111+ children : [ { type : 'text' , value : values [ index ] [ 1 ] || value } ]
121112 }
122113
123114 results . push ( result )
@@ -143,7 +134,7 @@ export function input(state, node) {
143134 }
144135
145136 /** @type {Text } */
146- const result = { type : 'text' , value : wrapText ( state , texts . join ( ', ' ) ) }
137+ const result = { type : 'text' , value : texts . join ( ', ' ) }
147138 state . patch ( node , result )
148139 return result
149140}
0 commit comments