File tree Expand file tree Collapse file tree
plugins/field-multilineinput/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,9 +163,11 @@ export class FieldMultilineInput extends Blockly.FieldTextInput {
163163 ) ;
164164 }
165165 let textLines = this . getText ( ) ;
166+ // TODO(google/blockly#8738): Use minimum-width setting mechanism
167+ // to be introduced in PR #9011.
166168 if ( ! textLines ) {
167169 // Prevent the field from disappearing if empty.
168- return Blockly . Field . NBSP ;
170+ return '\u00A0' ; // Non-breaking space.
169171 }
170172 const lines = textLines . split ( '\n' ) ;
171173 textLines = '' ;
@@ -182,7 +184,8 @@ export class FieldMultilineInput extends Blockly.FieldTextInput {
182184 }
183185 // Replace whitespace with non-breaking spaces so the text doesn't
184186 // collapse.
185- text = text . replace ( / \s / g, Blockly . Field . NBSP ) ;
187+ // TODO(google/blockly#8738): Use Blockly.Field.NBSP.
188+ text = text . replace ( / \s / g, '\u00A0' ) ; // Non-breaking space.
186189
187190 textLines += text ;
188191 if ( i !== displayLinesNumber - 1 ) {
You can’t perform that action at this time.
0 commit comments