Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-wiki
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-wiki
Commits
5b49a60a
Commit
5b49a60a
authored
Aug 21, 2012
by
benjaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix whitespaces added from html template
parent
53527925
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
wiki/plugins/images/markdown_extensions.py
+1
-1
wiki/plugins/images/templates/wiki/plugins/images/render.html
+6
-6
No files found.
wiki/plugins/images/markdown_extensions.py
View file @
5b49a60a
...
@@ -42,7 +42,7 @@ class ImagePreprocessor(markdown.preprocessors.Preprocessor):
...
@@ -42,7 +42,7 @@ class ImagePreprocessor(markdown.preprocessors.Preprocessor):
line
=
line
.
replace
(
m
.
group
(
1
),
""
)
line
=
line
.
replace
(
m
.
group
(
1
),
""
)
elif
previous_line_was_image
:
elif
previous_line_was_image
:
if
line
.
startswith
(
" "
):
if
line
.
startswith
(
" "
):
caption
+=
line
[
4
:]
caption
+=
line
[
3
:]
line
=
None
line
=
None
else
:
else
:
html
=
render_to_string
(
"wiki/plugins/images/render.html"
,
html
=
render_to_string
(
"wiki/plugins/images/render.html"
,
...
...
wiki/plugins/images/templates/wiki/plugins/images/render.html
View file @
5b49a60a
{% load thumbnail i18n %}
{% load thumbnail i18n %}
{% comment %}
{% comment %}
This template is used for the markdown extension that renders images and captions.
This template is used for the markdown extension that renders images and captions
{% endcomment %}
NB! Watch out for line breaks, markdown might add
<br
/>
s and
<p>
s.
{%
with image.current_revision.imagerevision as revision
%}
{%
endcomment %}{% with image.current_revision.imagerevision as revision %}{% spaceless
%}
<div
style=
"width: 250px; margin: 10px; float: {{ align }};"
>
<div
style=
"width: 250px; margin: 10px; float: {{ align }};"
>
<div
class=
"thumbnail"
>
<div
class=
"thumbnail"
>
{% thumbnail revision.image "250x250" as thumb %}
{% thumbnail revision.image "250x250" as thumb %}
...
@@ -19,4 +19,4 @@
...
@@ -19,4 +19,4 @@
</div>
</div>
</div>
</div>
</div>
</div>
{% endwith %}
{% end
spaceless %}{% end
with %}
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