slim 2.0.3 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +7 -8
- data/.yardopts +1 -1
- data/CHANGES +23 -0
- data/Gemfile +2 -1
- data/LICENSE +1 -1
- data/README.jp.md +497 -268
- data/README.md +505 -278
- data/Rakefile +14 -2
- data/benchmarks/view.haml +2 -2
- data/doc/include.md +20 -0
- data/doc/jp/include.md +20 -0
- data/doc/jp/logic_less.md +137 -0
- data/doc/jp/smart.md +102 -0
- data/doc/jp/translator.md +28 -0
- data/doc/smart.md +102 -0
- data/lib/slim/command.rb +8 -2
- data/lib/slim/controls.rb +4 -3
- data/lib/slim/do_inserter.rb +1 -1
- data/lib/slim/embedded.rb +26 -22
- data/lib/slim/end_inserter.rb +1 -1
- data/lib/slim/engine.rb +3 -2
- data/lib/slim/filter.rb +2 -2
- data/lib/slim/grammar.rb +3 -1
- data/lib/slim/include.rb +54 -0
- data/lib/slim/interpolation.rb +1 -1
- data/lib/slim/parser.rb +61 -46
- data/lib/slim/smart.rb +8 -0
- data/lib/slim/smart/escaper.rb +42 -0
- data/lib/slim/smart/filter.rb +96 -0
- data/lib/slim/smart/parser.rb +33 -0
- data/lib/slim/splat/builder.rb +3 -3
- data/lib/slim/splat/filter.rb +2 -2
- data/lib/slim/translator.rb +2 -2
- data/lib/slim/version.rb +1 -1
- data/slim.gemspec +1 -1
- data/test/core/helper.rb +5 -3
- data/test/core/test_code_blocks.rb +11 -0
- data/test/core/test_code_escaping.rb +14 -4
- data/test/core/test_embedded_engines.rb +26 -0
- data/test/core/test_html_structure.rb +39 -0
- data/test/core/test_parser_errors.rb +8 -25
- data/test/core/test_pretty.rb +15 -0
- data/test/core/test_ruby_errors.rb +0 -10
- data/test/include/files/recursive.slim +1 -0
- data/test/include/files/slimfile.slim +3 -0
- data/test/include/files/subdir/test.slim +1 -0
- data/test/include/files/textfile +1 -0
- data/test/include/test_include.rb +23 -0
- data/test/literate/TESTS.md +17 -2
- data/test/rails/test/test_slim.rb +1 -1
- data/test/smart/test_smart_text.rb +300 -0
- data/test/translator/test_translator.rb +7 -6
- metadata +22 -4
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
begin
|
2
|
-
require 'bundler'
|
2
|
+
require 'bundler/setup'
|
3
3
|
Bundler::GemHelper.install_tasks
|
4
4
|
rescue Exception
|
5
5
|
end
|
@@ -14,7 +14,7 @@ end
|
|
14
14
|
task 'test' => %w(test:core_and_plugins)
|
15
15
|
|
16
16
|
namespace 'test' do
|
17
|
-
task 'core_and_plugins' => %w(core literate logic_less translator)
|
17
|
+
task 'core_and_plugins' => %w(core literate logic_less translator smart include)
|
18
18
|
|
19
19
|
Rake::TestTask.new('core') do |t|
|
20
20
|
t.libs << 'lib' << 'test/core'
|
@@ -41,6 +41,18 @@ namespace 'test' do
|
|
41
41
|
t.verbose = true
|
42
42
|
end
|
43
43
|
|
44
|
+
Rake::TestTask.new('smart') do |t|
|
45
|
+
t.libs << 'lib' << 'test/core'
|
46
|
+
t.test_files = FileList['test/smart/test_*.rb']
|
47
|
+
t.verbose = true
|
48
|
+
end
|
49
|
+
|
50
|
+
Rake::TestTask.new('include') do |t|
|
51
|
+
t.libs << 'lib' << 'test/core'
|
52
|
+
t.test_files = FileList['test/include/test_*.rb']
|
53
|
+
t.verbose = true
|
54
|
+
end
|
55
|
+
|
44
56
|
Rake::TestTask.new('rails') do |t|
|
45
57
|
t.libs << 'lib'
|
46
58
|
t.test_files = FileList['test/rails/test/test_*.rb']
|
data/benchmarks/view.haml
CHANGED
data/doc/include.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Include
|
2
|
+
|
3
|
+
The include plugin allows Slim templates to include other files. The .slim extension is appended automatically to the
|
4
|
+
filename. If the included file is not a Slim file, it is interpreted as a text file with `#{interpolation}`.
|
5
|
+
|
6
|
+
Example:
|
7
|
+
|
8
|
+
include partial.slim
|
9
|
+
include partial
|
10
|
+
include partial.txt
|
11
|
+
|
12
|
+
Enable the include plugin with
|
13
|
+
|
14
|
+
require 'slim/include'
|
15
|
+
|
16
|
+
# Options
|
17
|
+
|
18
|
+
| Type | Name | Default | Purpose |
|
19
|
+
| ---- | ---- | ------- | ------- |
|
20
|
+
| Boolean | :include_dirs | [Dir.pwd, '.'] | Directories where to look for the files |
|
data/doc/jp/include.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# インクルード
|
2
|
+
|
3
|
+
インクルードプラグインを使うことで, Slim テンプレートに他の Slim ファイルを読み込むことができます。.slim 拡張子はファイル名に自動的に付加されます。
|
4
|
+
読み込まれたファイルが Slim でない場合は `#{文字列展開}` を含んだテキストファイルとして扱われます。
|
5
|
+
|
6
|
+
例:
|
7
|
+
|
8
|
+
include partial.slim
|
9
|
+
include partial
|
10
|
+
include partial.txt
|
11
|
+
|
12
|
+
インクルードプラグンを有効化
|
13
|
+
|
14
|
+
require 'slim/include'
|
15
|
+
|
16
|
+
# オプション
|
17
|
+
|
18
|
+
| タイプ | 名前 | デフォルト値 | 目的 |
|
19
|
+
| ------ | ---- | ------------ | ---- |
|
20
|
+
| Boolean | :include_dirs | [Dir.pwd, '.'] | ファイルを検索するディレクトリ |
|
@@ -0,0 +1,137 @@
|
|
1
|
+
# ロジックレスモード
|
2
|
+
|
3
|
+
ロジックレスモードは [Mustache](https://github.com/defunkt/mustache) にインスパイアされています。ロジックレスモードは
|
4
|
+
例えば動的コンテンツを含む再帰的ハッシュツリーのような辞書オブジェクトを使います。
|
5
|
+
|
6
|
+
## 条件付き
|
7
|
+
|
8
|
+
オブジェクトが false または empty? ではない場合, コンテンツが表示されます。
|
9
|
+
|
10
|
+
- article
|
11
|
+
h1 = title
|
12
|
+
|
13
|
+
## 反転条件付き
|
14
|
+
|
15
|
+
オブジェクトが false または empty? の場合, コンテンツが表示されます。
|
16
|
+
|
17
|
+
-! article
|
18
|
+
p Sorry, article not found
|
19
|
+
|
20
|
+
## 繰り返し
|
21
|
+
|
22
|
+
オブジェクトが配列の場合, この部分は繰り返されます。
|
23
|
+
|
24
|
+
- articles
|
25
|
+
tr: td = title
|
26
|
+
|
27
|
+
## ラムダ式
|
28
|
+
|
29
|
+
Mustache のように, Slim はラムダ式をサポートします。
|
30
|
+
|
31
|
+
= person
|
32
|
+
= name
|
33
|
+
|
34
|
+
ラムダ式は次のように定義できます:
|
35
|
+
|
36
|
+
def lambda_method
|
37
|
+
"<div class='person'>#{yield(:name => 'Andrew')}</div>"
|
38
|
+
end
|
39
|
+
|
40
|
+
任意に 1 つ以上のハッシュを `yield` に渡すことができます。複数のハッシュを渡した場合, 先述したようにブロックが繰り返されます。
|
41
|
+
|
42
|
+
## 辞書アクセス
|
43
|
+
|
44
|
+
サンプルコード:
|
45
|
+
|
46
|
+
- article
|
47
|
+
h1 = title
|
48
|
+
|
49
|
+
辞書オブジェクトは `:dictionary_access` オプションによって設定された順序でアクセスされます。デフォルトの順序:
|
50
|
+
|
51
|
+
1. `シンボル` - `article.respond_to?(:has_key?)` 且つ `article.has_key?(:title)` の場合, Slim は `article[:title]` を実行します。
|
52
|
+
2. `文字列` - `article.respond_to?(:has_key?)` 且つ `article.has_key?('title')` の場合, Slim は `article['title']` を実行します。
|
53
|
+
3. `メソッド` - `article.respond_to?(:title)` の場合, Slim は `article.send(:title)` を実行します。
|
54
|
+
4. `インスタンス変数` - `article.instance_variable_defined?(@title)` の場合, Slim は `article.instance_variable_get @title` を実行します。
|
55
|
+
|
56
|
+
すべて失敗した場合, Slim は親オブジェクトに対して同じ順序で title の参照を解決しようとします。この例では, 親オブジェクトはレンダリングしているテンプレートに対する辞書オブジェクトになります。
|
57
|
+
|
58
|
+
ご想像のとおり, article への参照は辞書オブジェクトに対して同じ手順で行われます。インスタンス変数はビューのコードでは利用を許されていませんが, Slim はそれを見つけて使います。基本的には, テンプレートの中で @ プレフィックスを落として使っています。パラメータ付きメソッドの呼び出しは許可されません。
|
59
|
+
|
60
|
+
|
61
|
+
## 文字列
|
62
|
+
|
63
|
+
`self` キーワードは検討中の要素を `.to_s` した値を返します。
|
64
|
+
|
65
|
+
辞書オブジェクトを与え,
|
66
|
+
|
67
|
+
{
|
68
|
+
:article => [
|
69
|
+
'Article 1',
|
70
|
+
'Article 2'
|
71
|
+
]
|
72
|
+
}
|
73
|
+
|
74
|
+
ビューで次のように
|
75
|
+
|
76
|
+
- article
|
77
|
+
tr: td = self
|
78
|
+
|
79
|
+
これは次のようになります。
|
80
|
+
|
81
|
+
<tr>
|
82
|
+
<td>Article 1</td>
|
83
|
+
</>
|
84
|
+
<tr>
|
85
|
+
<td>Article 2</td>
|
86
|
+
</tr>
|
87
|
+
|
88
|
+
|
89
|
+
## Rails でロジックレスモード
|
90
|
+
|
91
|
+
インストール:
|
92
|
+
|
93
|
+
$ gem install slim
|
94
|
+
|
95
|
+
require で指定:
|
96
|
+
|
97
|
+
gem 'slim', :require => 'slim/logic_less'
|
98
|
+
|
99
|
+
特定のアクションでのみロジックレスモードを有効化したい場合, まず設定でロジックレスモードを global に無効化します。
|
100
|
+
|
101
|
+
Slim::Engine.set_default_options :logic_less => false
|
102
|
+
|
103
|
+
さらに, アクションの中でレンダリングする度にロジックレスモードを有効化します。
|
104
|
+
|
105
|
+
class Controller
|
106
|
+
def action
|
107
|
+
Slim::Engine.with_options(:logic_less => true) do
|
108
|
+
render
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
## Sinatra でロジックレスモード
|
114
|
+
|
115
|
+
Sinatra には Slim のビルトインサポートがあります。しなければならないのはロジックレス Slim プラグインを require することです。config.ru で require できます:
|
116
|
+
|
117
|
+
require 'slim/logic_less'
|
118
|
+
|
119
|
+
これで準備は整いました!
|
120
|
+
|
121
|
+
特定のアクションでのみロジックレスモードを有効化したい場合, まず設定でロジックレスモードを global に無効化します。
|
122
|
+
|
123
|
+
Slim::Engine.set_default_options :logic_less => false
|
124
|
+
|
125
|
+
さらに, アクションの中でレンダリングする度にロジックレスモードを有効化します。
|
126
|
+
|
127
|
+
get '/page'
|
128
|
+
slim :page, :logic_less => true
|
129
|
+
end
|
130
|
+
|
131
|
+
## オプション
|
132
|
+
|
133
|
+
| 種類 | 名前 | デフォルト | 用途 |
|
134
|
+
| ---- | ---- | ------- | ------- |
|
135
|
+
| 真偽値 | :logic_less | true | ロジックレスモードを有効化 ('slim/logic_less' の required が必要) |
|
136
|
+
| 文字列 | :dictionary | "self" | 変数が検索される辞書への参照 |
|
137
|
+
| シンボル/配列<シンボル> | :dictionary_access | [:symbol, :string, :method, :instance_variable] | 辞書のアクセス順序 (:symbol, :string, :method, :instance_variable) |
|
data/doc/jp/smart.md
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
# スマートテキスト
|
2
|
+
|
3
|
+
テキストとマークアップを組み合わせる最も簡単な方法は <a name="smarttext">スマートテキストモード</a> を使うことです。
|
4
|
+
|
5
|
+
スマートテキストプラグインを有効化します。
|
6
|
+
|
7
|
+
require 'slim/smart'
|
8
|
+
|
9
|
+
自動的に `:implicit_text` オプションが有効になることで,
|
10
|
+
次のように簡単にテキストを入力できるようになります:
|
11
|
+
|
12
|
+
p
|
13
|
+
This is text.
|
14
|
+
|
15
|
+
小文字のタグ名や暗黙的なテキスト行などの特殊文字で始まっていない行を
|
16
|
+
Slim に自動的に処理させることができます。
|
17
|
+
テキストが複数行にわたる場合, 単にそれらをインデントします。
|
18
|
+
|
19
|
+
p
|
20
|
+
This is text,
|
21
|
+
and it spans
|
22
|
+
several lines.
|
23
|
+
|
24
|
+
`>` を使って明示的にテキストをマークすることもできます。
|
25
|
+
例えば, 小文字や特殊文字で始まっている場合,
|
26
|
+
テキストが複数行にわたる場合,
|
27
|
+
単に見た目の一貫性のために,
|
28
|
+
タグ名に大文字を使いたい場合,
|
29
|
+
`:implicit_text` オプションを無効にしたままにする必要がある場合です。
|
30
|
+
|
31
|
+
p
|
32
|
+
> 'This is text, too.'
|
33
|
+
p
|
34
|
+
>
|
35
|
+
This is text
|
36
|
+
which spans
|
37
|
+
several lines.
|
38
|
+
|
39
|
+
`:smart_text_escaping` が有効化されている限り,
|
40
|
+
エスケープされるべきテキストは自動的にエスケープされます。
|
41
|
+
しかし, 不便にならないように検出された HTML エンティティはそのまま使われます。
|
42
|
+
この方法はいつでも HTML のエスケープを気にすることのない,
|
43
|
+
最も理想的な方法です。
|
44
|
+
|
45
|
+
h1 Questions & Answers
|
46
|
+
footer
|
47
|
+
Copyright © #{Time.now.year}
|
48
|
+
|
49
|
+
スマートテキストの素晴らしいところの 1 つはマークアップとよくミックスしているところです。
|
50
|
+
スマートテキストの行は通常改行を維持するので,
|
51
|
+
強調やリンクのような他のタグを簡単に混ぜ合わせて使うことができます:
|
52
|
+
|
53
|
+
p
|
54
|
+
Your credit card
|
55
|
+
strong will not
|
56
|
+
> be charged now.
|
57
|
+
p
|
58
|
+
Check
|
59
|
+
a href=r(:faq) our FAQ
|
60
|
+
> for more info.
|
61
|
+
|
62
|
+
(タグから小文字のテキストを区別する場合明示的なテキストを示すインジケーター `>` の使用には注意してください)。
|
63
|
+
|
64
|
+
インラインタグのまわりにスペースを入れたくない場合があります。
|
65
|
+
幸いなことにスマートテキストはこの一般的なケースを処理できます。
|
66
|
+
スマートテキストのブロックが `:smart_text_begin_chars` で指定 (デフォルトは `,.;:!?)]}`)
|
67
|
+
された文字で始まる場合には先頭の改行が行われません。
|
68
|
+
同様に, スマートテキストのブロックが `:smart_text_begin_chars` で指定 (デフォルトは `,.;:!?)]}`)
|
69
|
+
された文字で終わる場合には改行されません。
|
70
|
+
これによって通常のテキストとリンクや span タグを混在させることがとても容易になります:
|
71
|
+
|
72
|
+
p
|
73
|
+
Please proceed to
|
74
|
+
a href="/" our homepage
|
75
|
+
.
|
76
|
+
p
|
77
|
+
Status: failed (
|
78
|
+
a href="#1" details
|
79
|
+
).
|
80
|
+
|
81
|
+
スマートテキストはタグのショートカットをも把握しているので,
|
82
|
+
次のような場合にも正しく対応します:
|
83
|
+
|
84
|
+
.class
|
85
|
+
#id
|
86
|
+
#{'More'}
|
87
|
+
i text
|
88
|
+
...
|
89
|
+
|
90
|
+
当然のことながら, これは短いテキストのスニペットでより便利に作業できることを意味しています。
|
91
|
+
ほとんどがテキストのコンテンツの場合, Markdown や Textile のような
|
92
|
+
ビルトインの埋め込みエンジンを使う方が良いでしょう。
|
93
|
+
|
94
|
+
## オプション
|
95
|
+
|
96
|
+
| 種類 | 名前 | デフォルト | 用途 |
|
97
|
+
| ---- | ---- | ---------- | ---- |
|
98
|
+
| 真偽値 | :implicit_text | true | 暗黙的テキストの判別を有効化 |
|
99
|
+
| 真偽値 | :smart_text | true | スマートテキストによる処理を有効化 |
|
100
|
+
| 文字列 | :smart_text_begin_chars | ',.;:!?)]}' | スマートテキストで先頭の改行を抑制する文字 |
|
101
|
+
| 文字列 | :smart_text_end_chars | '([{' | スマートテキストで末尾の改行を抑制する文字 |
|
102
|
+
| 真偽値 | :smart_text_escaping | true | 設定すると, スマートテキスト中のエスケープが必要な HTML 文字は自動的にエスケープされる |
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# 翻訳/I18n
|
2
|
+
|
3
|
+
翻訳プラグインは Gettext, Fast-Gettext または Rails I18n を使ったテンプレートの自動翻訳機能を提供します。
|
4
|
+
テンプレート内の静的テキストを翻訳版に変換します。
|
5
|
+
|
6
|
+
例:
|
7
|
+
|
8
|
+
h1 Welcome to #{url}!
|
9
|
+
|
10
|
+
Gettext は文字列を英語からドイツ語に変換し, 文字列が展開される部分は %1, %2, ... の順に変換されます。
|
11
|
+
|
12
|
+
"Welcome to %1!" -> "Willkommen auf %1!"
|
13
|
+
|
14
|
+
次のようにレンダリングされます。
|
15
|
+
|
16
|
+
<h1>Willkommen auf slim-lang.com!</h1>
|
17
|
+
|
18
|
+
翻訳プラグインを有効化します。
|
19
|
+
|
20
|
+
require 'slim/translator'
|
21
|
+
|
22
|
+
# オプション
|
23
|
+
|
24
|
+
| 種類 | 名前 | デフォルト | 用途 |
|
25
|
+
| ---- | ---- | ---------- | ---- |
|
26
|
+
| 真偽値 | :tr | true | 翻訳の有効化 ('slim/translator' の required が必要) |
|
27
|
+
| シンボル | :tr_mode | :dynamic | 翻訳を :static = コンパイル時に実施, :dynamic = ランタイムで実施 |
|
28
|
+
| 文字列 | :tr_fn | インストールされた翻訳ライブラリに依存 | 翻訳用ヘルパ, gettext の場合 '_' |
|
data/doc/smart.md
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
# Smart text
|
2
|
+
|
3
|
+
The easiest way to combine text and markup is to use the <a name="smarttext">smart text mode</a>.
|
4
|
+
|
5
|
+
Enable the smart text plugin with
|
6
|
+
|
7
|
+
require 'slim/smart'
|
8
|
+
|
9
|
+
This automatically enables the `:implicit_text` option as well,
|
10
|
+
so you can easily type text like this:
|
11
|
+
|
12
|
+
p
|
13
|
+
This is text.
|
14
|
+
|
15
|
+
Slim will automatically treat any line which doesn't start
|
16
|
+
with a lowercase tag name or any of the special characters as an implicit text line.
|
17
|
+
If the text spans several lines, simply indent them.
|
18
|
+
|
19
|
+
p
|
20
|
+
This is text,
|
21
|
+
and it spans
|
22
|
+
several lines.
|
23
|
+
|
24
|
+
You can also mark the text explicitly with `>`,
|
25
|
+
for example when it starts with lowercase letter or unusual character,
|
26
|
+
or when the text spans several lines,
|
27
|
+
or merely for aesthetic consistency,
|
28
|
+
or if you want to use uppercase tag names
|
29
|
+
and therefore need to keep the `:implicit_text` option disabled.
|
30
|
+
|
31
|
+
p
|
32
|
+
> 'This is text, too.'
|
33
|
+
p
|
34
|
+
>
|
35
|
+
This is text
|
36
|
+
which spans
|
37
|
+
several lines.
|
38
|
+
|
39
|
+
As long as you leave the `:smart_text_escaping` enabled,
|
40
|
+
any non-verbatim text is automatically escaped for you.
|
41
|
+
However, for your convenience, any HTML entities detected are still used verbatim.
|
42
|
+
This way you are most likely to get what you really wanted,
|
43
|
+
without having to worry about HTML escaping all the time.
|
44
|
+
|
45
|
+
h1 Questions & Answers
|
46
|
+
footer
|
47
|
+
Copyright © #{Time.now.year}
|
48
|
+
|
49
|
+
Another cool thing about smart text is that it mixes fairly well with markup.
|
50
|
+
Smart text lines normally preserve newlines,
|
51
|
+
so it is easy to mix them with other tags, like emphasis or links:
|
52
|
+
|
53
|
+
p
|
54
|
+
Your credit card
|
55
|
+
strong will not
|
56
|
+
> be charged now.
|
57
|
+
p
|
58
|
+
Check
|
59
|
+
a href=r(:faq) our FAQ
|
60
|
+
> for more info.
|
61
|
+
|
62
|
+
(Note the use of the explicit text indicator `>` to distinguish lowercase text from tags).
|
63
|
+
|
64
|
+
However, sometimes you do not want the whitespace around the inline tag.
|
65
|
+
Fortunately smart text takes care of the most common cases for you as well.
|
66
|
+
The leading newline is suppressed if the smart text block begins
|
67
|
+
with a character from the `:smart_text_begin_chars` set (`,.;:!?)]}` by default).
|
68
|
+
Similarly, trailing newline is suppressed if the smart text block ends
|
69
|
+
with a character from the `:smart_text_end_chars` set (`([{` by default).
|
70
|
+
This makes it quite easy to mix normal text with links or spans like this:
|
71
|
+
|
72
|
+
p
|
73
|
+
Please proceed to
|
74
|
+
a href="/" our homepage
|
75
|
+
.
|
76
|
+
p
|
77
|
+
Status: failed (
|
78
|
+
a href="#1" details
|
79
|
+
).
|
80
|
+
|
81
|
+
Note that smart text is smart enough to know about tag shortcuts, too,
|
82
|
+
so it will correctly deal even with cases like this:
|
83
|
+
|
84
|
+
.class
|
85
|
+
#id
|
86
|
+
#{'More'}
|
87
|
+
i text
|
88
|
+
...
|
89
|
+
|
90
|
+
Of course, all this is meant only to make working with short text snippets more convenient.
|
91
|
+
For bulk text content, you are more than welcome to use one of the builtin embedded engines,
|
92
|
+
such as Markdown or Textile.
|
93
|
+
|
94
|
+
## Options
|
95
|
+
|
96
|
+
| Type | Name | Default | Purpose |
|
97
|
+
| ---- | ---- | ------- | ------- |
|
98
|
+
| Boolean | :implicit_text | true | Enable implicit text recognition |
|
99
|
+
| Boolean | :smart_text | true | Enable smart text mode newline processing |
|
100
|
+
| String | :smart_text_begin_chars | ',.;:!?)]}' | Characters suppressing leading newline in smart text |
|
101
|
+
| String | :smart_text_end_chars | '([{' | Characters suppressing trailing newline in smart text |
|
102
|
+
| Boolean | :smart_text_escaping | true | When set, HTML characters which need escaping are automatically escaped in smart text |
|