回答編集履歴
2
。
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# <pre>で挟む
|
1
|
+
# <pre>で挟む
|
2
2
|
|
3
3
|
|
4
4
|
|
1
<br />
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
<pre>で挟む。
|
1
|
+
# <pre>で挟む。
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -7,3 +7,19 @@
|
|
7
7
|
var body = "<h2>内容</h2>\n<pre>\(textView.text)</pre>"
|
8
8
|
|
9
9
|
```
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
# 改行コードを<br />に変換する
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
```swift
|
18
|
+
|
19
|
+
let text = textView.text.stringByReplacingOccurrencesOfString("\n", withString: "<br />")
|
20
|
+
|
21
|
+
var body = "<h2>内容</h2>\n\(text)"
|
22
|
+
|
23
|
+
```
|
24
|
+
|
25
|
+
|