Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
138e26b1
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
138e26b1
编写于
10月 04, 2016
作者:
P
Phil Hughes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adds v-pre to code blocks in comments
Closes #22911
上级
796f531f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
3 deletion
+17
-3
CHANGELOG
CHANGELOG
+2
-1
lib/banzai/filter/sanitization_filter.rb
lib/banzai/filter/sanitization_filter.rb
+1
-1
lib/banzai/filter/syntax_highlight_filter.rb
lib/banzai/filter/syntax_highlight_filter.rb
+2
-1
spec/features/notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+12
-0
未找到文件。
CHANGELOG
浏览文件 @
138e26b1
...
...
@@ -14,6 +14,7 @@ v 8.13.0 (unreleased)
- Simplify Mentionable concern instance methods
- Fix permission for setting an issue's due date
- Expose expires_at field when sharing project on API
- Fix VueJS template tags being rendered in code comments
- Fix issue with page scrolling to top when closing or pinning sidebar (lukehowell)
- Allow the Koding integration to be configured through the API
- Added soft wrap button to repository file/blob editor
...
...
@@ -44,7 +45,7 @@ v 8.13.0 (unreleased)
- Notify the Merger about merge after successful build (Dimitris Karakasilis)
- Fix broken repository 500 errors in project list
- Close todos when accepting merge requests via the API !6486 (tonygambone)
- Changed Slack service user referencing from full name to username (Sebastian Poxhofer)
- Changed Slack service user referencing from full name to username (Sebastian Poxhofer)
- Add Container Registry on/off status to Admin Area !6638 (the-undefined)
v 8.12.4 (unreleased)
...
...
lib/banzai/filter/sanitization_filter.rb
浏览文件 @
138e26b1
...
...
@@ -25,7 +25,7 @@ module Banzai
return
if
customized?
(
whitelist
[
:transformers
])
# Allow code highlighting
whitelist
[
:attributes
][
'pre'
]
=
%w(class)
whitelist
[
:attributes
][
'pre'
]
=
%w(class
v-pre
)
whitelist
[
:attributes
][
'span'
]
=
%w(class)
# Allow table alignment
...
...
lib/banzai/filter/syntax_highlight_filter.rb
浏览文件 @
138e26b1
...
...
@@ -30,7 +30,8 @@ module Banzai
# users can still access an issue/comment/etc.
end
highlighted
=
%(<pre class="#{css_classes}"><code>#{code}</code></pre>)
highlighted
=
%(<pre class="#{css_classes}" v-pre="true"><code>#{code}</code></pre>)
puts
highlighted
# Extracted to a method to measure it
replace_parent_pre_element
(
node
,
highlighted
)
...
...
spec/features/notes_on_merge_requests_spec.rb
浏览文件 @
138e26b1
...
...
@@ -240,6 +240,18 @@ describe 'Comments', feature: true do
is_expected
.
to
have_css
(
'.notes_holder .note'
,
count:
1
)
is_expected
.
to
have_button
(
'Reply...'
)
end
it
'adds code to discussion'
do
click_button
'Reply...'
page
.
within
(
first
(
'.js-discussion-note-form'
))
do
fill_in
'note[note]'
,
with:
'```{{ test }}```'
click_button
(
'Comment'
)
end
expect
(
page
).
to
have_content
(
'{{ test }}'
)
end
end
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录