0
エスケープシーケンスに関連する次の文字列フォーマットの問題を解決するにはどうすればよいですか?スカラ文字列の書式設定:エスケープシーケンス
[~] 17:34:04$ scala
Welcome to Scala 2.11.8 (OpenJDK 64-Bit Server VM, Java 1.8.0_151).
Type in expressions for evaluation. Or try :help.
scala> val fullFootnoteId = "asdf"
fullFootnoteId: String = asdf
scala> val footnoteId = 1
footnoteId: Int = 1
scala> val footnoteTag = s"<sup id=\"ref_${fullFootnoteId}\"><a href=\"#foot_${fullFootnoteId}\">${footnoteId}</a></sup>"
<console>:12: error: value ref_$ is not a member of String
val footnoteTag = s"<sup id=\"ref_${fullFootnoteId}\"><a href=\"#foot_${fullFootnoteId}\">${footnoteId}</a></sup>"
^
<console>:12: error: value \ is not a member of String
val footnoteTag = s"<sup id=\"ref_${fullFootnoteId}\"><a href=\"#foot_${fullFootnoteId}\">${footnoteId}</a></sup>"
^