Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1f87c5d3
Commit
1f87c5d3
authored
Feb 16, 2021
by
ddavison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add preload attribute to markdown videos
parent
c13b2235
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
changelogs/unreleased/321297-load-only-metadata-for-markdown-video-include.yml
.../321297-load-only-metadata-for-markdown-video-include.yml
+5
-0
lib/banzai/filter/video_link_filter.rb
lib/banzai/filter/video_link_filter.rb
+1
-1
spec/lib/banzai/filter/video_link_filter_spec.rb
spec/lib/banzai/filter/video_link_filter_spec.rb
+1
-0
No files found.
changelogs/unreleased/321297-load-only-metadata-for-markdown-video-include.yml
0 → 100644
View file @
1f87c5d3
---
title
:
Add preload attribute to markdown videos
merge_request
:
54350
author
:
type
:
performance
lib/banzai/filter/video_link_filter.rb
View file @
1f87c5d3
...
...
@@ -15,7 +15,7 @@ module Banzai
end
def
extra_element_attrs
{
width:
"400"
}
{
width:
"400"
,
preload:
"metadata"
}
end
end
end
...
...
spec/lib/banzai/filter/video_link_filter_spec.rb
View file @
1f87c5d3
...
...
@@ -33,6 +33,7 @@ RSpec.describe Banzai::Filter::VideoLinkFilter do
expect
(
video
.
name
).
to
eq
'video'
expect
(
video
[
'src'
]).
to
eq
src
expect
(
video
[
'width'
]).
to
eq
"400"
expect
(
video
[
'preload'
]).
to
eq
'metadata'
expect
(
paragraph
.
name
).
to
eq
'p'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment