Skip to content

Commit 403cd16

Browse files
committed
update changelog
1 parent 13b83a9 commit 403cd16

File tree

3 files changed

+26
-17
lines changed

3 files changed

+26
-17
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
[English Change Log](CHANGELOG_EN.md)
44

5+
# 1.3.1
6+
7+
`FIX` 修复了`space_before_inline_comment=2`对大括号之后的注释不起作用的BUG
8+
9+
`NEW` 新增选项`line_space_around_block`表示语句块开始和末尾保留的空行数, 该选项默认值为`fixed(1)`, 表示语句块不保留前面和后面的空行. 其可选的值范围是:
10+
`keep`, `max(n)`, `min(n)`, `fixed(n)`, 该选项无法作用于最外层的代码块.
11+
12+
513
# 1.3.0
614

715
`REFACTOR` 重写了分词算法, 和相关的拼写检查

CHANGELOG_EN.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
# 1.3.1
4+
5+
`FIX` Fixed a bug where `space_before_inline_comment=2` did not work for comments after curly braces.
6+
7+
`NEW` Added the option `line_space_around_block` to specify the number of blank lines to keep before and after a code block. The default value is `fixed(1)`, which means no blank lines are kept before or after the code block. The possible values are `keep`, `max(n)`, `min(n)`, and `fixed(n)`. Note that this option does not apply to the outermost level of code blocks.
8+
39
# 1.3.0
410

511
`REFACTOR` rewrote the tokenization algorithm and related spell-checking.
Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
11
#include "CodeFormatCore//Config/LanguageTranslator.h"
22

3-
LanguageTranslator& LanguageTranslator::GetInstance()
4-
{
5-
static LanguageTranslator instance;
6-
return instance;
3+
LanguageTranslator &LanguageTranslator::GetInstance() {
4+
static LanguageTranslator instance;
5+
return instance;
76
}
87

9-
LanguageTranslator::LanguageTranslator()
10-
{
8+
LanguageTranslator::LanguageTranslator() {
119
}
1210

13-
std::string LanguageTranslator::Get(const std::string& source)
14-
{
15-
auto it = _languageDictionary.find(source);
16-
if(it != _languageDictionary.end())
17-
{
18-
return it->second;
19-
}
20-
return source;
11+
std::string LanguageTranslator::Get(const std::string &source) {
12+
auto it = _languageDictionary.find(source);
13+
if (it != _languageDictionary.end()) {
14+
return it->second;
15+
}
16+
return source;
2117
}
2218

23-
void LanguageTranslator::SetLanguageMap(std::map<std::string, std::string>&& languageDictionary)
24-
{
25-
_languageDictionary = languageDictionary;
19+
void LanguageTranslator::SetLanguageMap(std::map<std::string, std::string> &&languageDictionary) {
20+
_languageDictionary = languageDictionary;
2621
}

0 commit comments

Comments
 (0)