Commit 02f3c7eb authored by Sacred Seven's avatar Sacred Seven

Fixing email and markdown RTL

closes #1
parent 2bfeb280
......@@ -183,9 +183,6 @@ $ ->
$(@).closest(".diff-file").find(".notes_holder").toggle()
e.preventDefault()
# RTL Support in wiki pages
$('.wiki').find('*').not('li').attr('dir', 'auto');
$(document).on "click", '.js-confirm-danger', (e) ->
e.preventDefault()
btn = $(e.target)
......
......@@ -48,7 +48,9 @@ module GitlabMarkdownHelper
space_after_headers: true,
superscript: true)
end
@markdown.render(text).html_safe
html_doc = Nokogiri::HTML(@markdown.render(text))
html_doc.css(':not(li)').each { |dom| dom[:dir] = :auto }
html_doc.to_html.html_safe
end
# Return the first line of +text+, up to +max_chars+, after parsing the line
......
%div
= markdown(@note.note)
:javascript
document.addEventListener("DOMContentLoaded", function(event) {
var elements = document.getElementsByTagName("*");
for (var i = 0; i < elements.length; ++i) {
elements[i].setAttribute("dir", "auto");
}
});
......@@ -5,11 +5,3 @@
%p
Assignee:
%span= @issue.assignee_name
:javascript
document.addEventListener("DOMContentLoaded", function(event) {
var elements = document.getElementsByTagName("*");
for (var i = 0; i < elements.length; ++i) {
elements[i].setAttribute("dir", "auto");
}
});
......@@ -10,11 +10,3 @@
-if @merge_request.description
= markdown(@merge_request.description)
:javascript
document.addEventListener("DOMContentLoaded", function(event) {
var elements = document.getElementsByTagName("*");
for (var i = 0; i < elements.length; ++i) {
elements[i].setAttribute("dir", "auto");
}
});
......@@ -26,11 +26,3 @@
- if @compare.timeout
%h5 Huge diff. To prevent performance issues changes are hidden
:javascript
document.addEventListener("DOMContentLoaded", function(event) {
var elements = document.getElementsByTagName("*");
for (var i = 0; i < elements.length; ++i) {
elements[i].setAttribute("dir", "auto");
}
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment