mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
code cleanup: rubocop: fix Layout/CommentIndentation and Layout/MultilineArrayBraceLayout in test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18810 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
65328a5d53
commit
b7b42e9d76
@ -76,11 +76,6 @@ Layout/ClosingHeredocIndentation:
|
||||
Layout/ClosingParenthesisIndentation:
|
||||
Enabled: false
|
||||
|
||||
# Cop supports --auto-correct.
|
||||
Layout/CommentIndentation:
|
||||
Exclude:
|
||||
- 'test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb'
|
||||
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: leading, trailing
|
||||
@ -208,7 +203,6 @@ Layout/MultilineArrayBraceLayout:
|
||||
- 'app/helpers/projects_helper.rb'
|
||||
- 'app/helpers/settings_helper.rb'
|
||||
- 'app/helpers/users_helper.rb'
|
||||
- 'test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb'
|
||||
|
||||
# Cop supports --auto-correct.
|
||||
Layout/MultilineBlockLayout:
|
||||
|
||||
@ -125,33 +125,40 @@ EXPECTED
|
||||
end
|
||||
|
||||
STR_WITH_PRE = [
|
||||
# 0
|
||||
"# Title
|
||||
# 0
|
||||
<<~STR.chomp,
|
||||
# Title
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.",
|
||||
# 1
|
||||
"## Heading 2
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.
|
||||
STR
|
||||
# 1
|
||||
<<~STR.chomp,
|
||||
## Heading 2
|
||||
|
||||
~~~ruby
|
||||
def foo
|
||||
end
|
||||
~~~
|
||||
~~~ruby
|
||||
def foo
|
||||
end
|
||||
~~~
|
||||
|
||||
Morbi facilisis accumsan orci non pharetra.
|
||||
Morbi facilisis accumsan orci non pharetra.
|
||||
|
||||
```
|
||||
Pre Content:
|
||||
```
|
||||
Pre Content:
|
||||
|
||||
## Inside pre
|
||||
## Inside pre
|
||||
|
||||
<tag> inside pre block
|
||||
<tag> inside pre block
|
||||
|
||||
Morbi facilisis accumsan orci non pharetra.
|
||||
```",
|
||||
# 2
|
||||
"### Heading 3
|
||||
Morbi facilisis accumsan orci non pharetra.
|
||||
```
|
||||
STR
|
||||
# 2
|
||||
<<~STR.chomp,
|
||||
### Heading 3
|
||||
|
||||
Nulla nunc nisi, egestas in ornare vel, posuere ac libero."]
|
||||
Nulla nunc nisi, egestas in ornare vel, posuere ac libero.
|
||||
STR
|
||||
]
|
||||
|
||||
def test_get_section_should_ignore_pre_content
|
||||
text = STR_WITH_PRE.join("\n\n")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user