BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d0c5ac4a
Commit
d0c5ac4a
authored
Mar 09, 2016
by
Florent Baldino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache only last response in markdown preview
parent
af24645d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
markdown_preview.js.coffee
app/assets/javascripts/markdown_preview.js.coffee
+2
-2
_shortcuts.html.haml
app/views/help/_shortcuts.html.haml
+5
-1
No files found.
app/assets/javascripts/markdown_preview.js.coffee
View file @
d0c5ac4a
...
...
@@ -25,7 +25,7 @@ class @MarkdownPreview
renderMarkdown
:
(
text
,
success
)
->
return
unless
window
.
markdown_preview_path
return
success
(
@
ajaxCache
[
text
])
if
@
ajaxCache
[
text
]
return
success
(
@
ajaxCache
.
response
)
if
text
==
@
ajaxCache
.
text
$
.
ajax
type
:
'POST'
...
...
@@ -33,7 +33,7 @@ class @MarkdownPreview
data
:
{
text
:
text
}
dataType
:
'json'
success
:
(
response
)
=>
@
ajaxCache
[
text
]
=
response
@
ajaxCache
=
text
:
text
,
response
:
response
success
(
response
)
hideReferencedUsers
:
(
form
)
->
...
...
app/views/help/_shortcuts.html.haml
View file @
d0c5ac4a
...
...
@@ -24,7 +24,11 @@
%td
Show this dialog
%tr
%td
.shortcut
.key
ctrl shift p
-
if
browser
.
mac?
.key
ctrl
⌘
p
-
else
.key
ctrl shift p
%td
Toggle Markdown preview
%tbody
%tr
...
...
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