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
0afe2e05
Commit
0afe2e05
authored
Feb 17, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Gotchas doc
[ci skip]
parent
6053ad84
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
doc/development/gotchas.md
doc/development/gotchas.md
+7
-8
No files found.
doc/development/gotchas.md
View file @
0afe2e05
...
@@ -46,8 +46,8 @@ Rubocop](https://gitlab.com/gitlab-org/gitlab-ce/blob/8-4-stable/.rubocop.yml#L9
...
@@ -46,8 +46,8 @@ Rubocop](https://gitlab.com/gitlab-org/gitlab-ce/blob/8-4-stable/.rubocop.yml#L9
Using the inline
`:coffee`
or
`:coffeescript`
Haml filters comes with a
Using the inline
`:coffee`
or
`:coffeescript`
Haml filters comes with a
performance overhead.
performance overhead.
We've
[
removed these two filters entirely
](
https://gitlab.com/gitlab-org/gitlab-ce/blob/8-5-stable/config/initializers/haml.rb
)
_
**Note:**
We've
[
removed these two filters
](
https://gitlab.com/gitlab-org/gitlab-ce/blob/8-5-stable/config/initializers/haml.rb
)
through an initializer.
in an initializer._
### Further reading
### Further reading
...
@@ -63,21 +63,20 @@ perfectly fine to write some JavaScript like the following:
...
@@ -63,21 +63,20 @@ perfectly fine to write some JavaScript like the following:
$
(
'
#js-my-selector
'
).
hide
();
$
(
'
#js-my-selector
'
).
hide
();
```
```
But there's a feature of GitLab's Markdown processing that will automatically
However, there's a feature of GitLab's Markdown processing that
[
automatically
add
`id`
attributes underneath header elements in order to make them linkable.
adds anchors to header elements
][
ToC Processing
]
, with the
`id`
attribute being
The content of the header is
[
"dasherized"
][
ToC Processing
]
and used in the
`id`
automatically generated based on the content of the header.
attribute.
Unfortunately, this feature makes it possible for user-generated content to
Unfortunately, this feature makes it possible for user-generated content to
create a header element with the same
`id`
attribute we're using in our
create a header element with the same
`id`
attribute we're using in our
selector, potentially breaking the JavaScript behavior. A user could break the
selector, potentially breaking the JavaScript behavior. A user could break the
above example
JavaScript
with the following Markdown:
above example with the following Markdown:
```
markdown
```
markdown
## JS My Selector
## JS My Selector
```
```
Which gets converted to the following HTML
after processing
:
Which gets converted to the following HTML:
```
html
```
html
<h2>
<h2>
...
...
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