1

以下の YAML に遭遇し、Ruby Psych を使用して解析しようとしましたが、「checkboxesValues:」行で「次のトークンをスキャン中にトークンを開始できない文字が見つかりました」と出力されます (最後の 4 行目)。

notepad++ を使用して YAML を開くと、YAML の最後の 4 行が赤色になります。しかし、この YAML の何が問題なのかわかりません。

助けてください。前もって感謝します。

-
title  : Multiple Radios Inline
fields : 
name:
  label  : Group Name
  type   : input
  value  : radios
label:
  label  : Label Text
  type   : input
  value  : Inline Radios
required:
  label  : Required
  type   : checkbox
  value  : false
radios:
  label  : Radios
  type   : textarea-split
  value  : [1,2,3,4]
radiosValues:
  label  : Radios Values
  type   : textarea-split
  value  : ["1", "2", "3", "4"]
-
 title  : Multiple Checkboxes
 fields : 
name:
  label  : Group Name
  type   : input
  value  : checkboxes
label:
  label  : Label Text
  type   : input
  value  : Multiple Checkboxes
required:
  label  : Required
  type   : checkbox
  value  : false
checkboxes:
  label  : Checkboxes
  type   : textarea-split
  value  : ["Option one", "Option two"]
checkboxesValues:
  label  : Checkboxes Values
  type   : textarea-split
  value  : ["1", "2"]
4

1 に答える 1

2

notepad++をクリックして、オプションをFind選択し、Regexを検索し\tます。何もないはずです。また、空白の表示 (P に似たアイコン) を有効にして、一貫性のないものを検索します。

于 2014-01-15T09:43:32.707 に答える