Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make support for linked svg and svgz explicit #39

Merged
merged 2 commits into from
Jan 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/org-ruby/regexp_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def build_org_link_regexp
([^\]\[]+) # This is the friendly text
\])?\]/x
@org_angle_link_text_regexp = /<(\w+:[^\]\s<>]+)>/
@org_image_file_regexp = /\.(gif|jpe?g|p(?:bm|gm|n[gm]|pm)|svg|tiff?|x[bp]m)/i
@org_image_file_regexp = /\.(gif|jpe?g|p(?:bm|gm|n[gm]|pm)|svgz?|tiff?|x[bp]m)/i
end
end # class Emphasis
end # module Orgmode
12 changes: 12 additions & 0 deletions spec/html_examples/include-file.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ <h1>Within a center block</h1>
<li>.png</li>
<li>.gif</li>
<li>.jpeg</li>
<li>.svg</li>
<li>.svgz</li>
</ul>
<p>Sample .svg:</p>
<p><img src="https://www.w3.org/Graphics/SVG/Test/20110816/svg/animate-dom-01-f.svg" alt="https://www.w3.org/Graphics/SVG/Test/20110816/svg/animate-dom-01-f.svg" /></p>
<p>Sample .svgz:</p>
<p><img src="https://www.w3.org/Graphics/SVG/Test/20110816/svg/conform-viewers-01-t.svgz" alt="https://www.w3.org/Graphics/SVG/Test/20110816/svg/conform-viewers-01-t.svgz" /></p>
</div>
<h1>Within a blockquote</h1>
<p>This is similar to the center block:</p>
Expand All @@ -102,7 +108,13 @@ <h1>Within a blockquote</h1>
<li>.png</li>
<li>.gif</li>
<li>.jpeg</li>
<li>.svg</li>
<li>.svgz</li>
</ul>
<p>Sample .svg:</p>
<p><img src="https://www.w3.org/Graphics/SVG/Test/20110816/svg/animate-dom-01-f.svg" alt="https://www.w3.org/Graphics/SVG/Test/20110816/svg/animate-dom-01-f.svg" /></p>
<p>Sample .svgz:</p>
<p><img src="https://www.w3.org/Graphics/SVG/Test/20110816/svg/conform-viewers-01-t.svgz" alt="https://www.w3.org/Graphics/SVG/Test/20110816/svg/conform-viewers-01-t.svgz" /></p>
<p>After</p>
</blockquote>
<h1>Within an example block, it should not be possible to include a file.</h1>
Expand Down
6 changes: 6 additions & 0 deletions spec/html_examples/inline-images.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@
<li>.png</li>
<li>.gif</li>
<li>.jpeg</li>
<li>.svg</li>
<li>.svgz</li>
</ul>
<p>Sample .svg:</p>
<p><img src="https://www.w3.org/Graphics/SVG/Test/20110816/svg/animate-dom-01-f.svg" alt="https://www.w3.org/Graphics/SVG/Test/20110816/svg/animate-dom-01-f.svg" /></p>
<p>Sample .svgz:</p>
<p><img src="https://www.w3.org/Graphics/SVG/Test/20110816/svg/conform-viewers-01-t.svgz" alt="https://www.w3.org/Graphics/SVG/Test/20110816/svg/conform-viewers-01-t.svgz" /></p>
9 changes: 9 additions & 0 deletions spec/html_examples/inline-images.org
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,13 @@ the inline image. I recognize the following image file types:
- .png
- .gif
- .jpeg
- .svg
- .svgz

Sample .svg:

[[https://www.w3.org/Graphics/SVG/Test/20110816/svg/animate-dom-01-f.svg]]

Sample .svgz:

[[https://www.w3.org/Graphics/SVG/Test/20110816/svg/conform-viewers-01-t.svgz]]
10 changes: 10 additions & 0 deletions spec/markdown_examples/inline-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,13 @@ the inline image. I recognize the following image file types:
* .png
* .gif
* .jpeg
* .svg
* .svgz

Sample .svg:

[https://www.w3.org/Graphics/SVG/Test/20110816/svg/animate-dom-01-f.svg](https://www.w3.org/Graphics/SVG/Test/20110816/svg/animate-dom-01-f.svg)

Sample .svgz:

[https://www.w3.org/Graphics/SVG/Test/20110816/svg/conform-viewers-01-t.svgz](https://www.w3.org/Graphics/SVG/Test/20110816/svg/conform-viewers-01-t.svgz)
9 changes: 9 additions & 0 deletions spec/markdown_examples/inline-images.org
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,13 @@ the inline image. I recognize the following image file types:
- .png
- .gif
- .jpeg
- .svg
- .svgz

Sample .svg:

[[https://www.w3.org/Graphics/SVG/Test/20110816/svg/animate-dom-01-f.svg]]

Sample .svgz:

[[https://www.w3.org/Graphics/SVG/Test/20110816/svg/conform-viewers-01-t.svgz]]