Skip to content
Open
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/image_regexp.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Orgmode
module ImageRegexp
def image_file
/\.(gif|jpe?g|p(?:bm|gm|n[gm]|pm)|svgz?|tiff?|x[bp]m)/i
/\.(gif|jpe?g|webp|p(?:bm|gm|n[gm]|pm)|svgz?|tiff?|x[bp]m)/i
end
end
end
2 changes: 1 addition & 1 deletion lib/org-ruby/regexp_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def org_emphasis_regexp
end

def org_image_file_regexp
/\.(gif|jpe?g|p(?:bm|gm|n[gm]|pm)|svgz?|tiff?|x[bp]m)/i
/\.(gif|jpe?g|webp|p(?:bm|gm|n[gm]|pm)|svgz?|tiff?|x[bp]m)/i
end

private
Expand Down
10 changes: 6 additions & 4 deletions spec/html_examples/include-file.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ <h2>Continue numbered list</h2>
<p>And now back to normal!</p>
<h2>Within a commented block</h2>
<pre class="example">
&lt;li&gt;[ ] &amp;#8220;smart quotes&amp;#8221;&lt;/li&gt;
&lt;li&gt;[ ] I think I need this for &amp;#8216;single quotes&amp;#8217; too. Don&amp;#8217;t I?&lt;/li&gt;
&lt;li&gt;[ ] Em dashes would be great &amp;#8212; wouldn&amp;#8217;t they?&lt;/li&gt;
&lt;li&gt;[ ] I hope to develop an en dash sometime in 2010 &amp;#8211; 2011.&lt;/li&gt;
&lt;li&gt;[ ] &amp;#8220;smart quotes&amp;#8221;&lt;/li&gt;
&lt;li&gt;[ ] I think I need this for &amp;#8216;single quotes&amp;#8217; too. Don&amp;#8217;t I?&lt;/li&gt;
&lt;li&gt;[ ] Em dashes would be great &amp;#8212; wouldn&amp;#8217;t they?&lt;/li&gt;
&lt;li&gt;[ ] I hope to develop an en dash sometime in 2010 &amp;#8211; 2011.&lt;/li&gt;
</pre>
<h2>Within a center block</h2>
<div style="text-align: center">
Expand All @@ -98,6 +98,7 @@ <h2>Within a center block</h2>
<li>.jpeg</li>
<li>.svg</li>
<li>.svgz</li>
<li>.webp</li>
</ul>
<p>Sample absolute link to .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>
Expand Down Expand Up @@ -129,6 +130,7 @@ <h2>Within a blockquote</h2>
<li>.jpeg</li>
<li>.svg</li>
<li>.svgz</li>
<li>.webp</li>
</ul>
<p>Sample absolute link to .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>
Expand Down
1 change: 1 addition & 0 deletions spec/html_examples/inline-images.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<li>.jpeg</li>
<li>.svg</li>
<li>.svgz</li>
<li>.webp</li>
</ul>
<p>Sample absolute link to .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>
Expand Down
1 change: 1 addition & 0 deletions spec/html_examples/inline-images.org
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ the inline image. I recognize the following image file types:
- .jpeg
- .svg
- .svgz
- .webp

Sample absolute link to .svg:

Expand Down
1 change: 1 addition & 0 deletions spec/markdown_examples/inline-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ the inline image. I recognize the following image file types:
* .jpeg
* .svg
* .svgz
* .webp

Sample .svg:

Expand Down
1 change: 1 addition & 0 deletions spec/markdown_examples/inline-images.org
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ the inline image. I recognize the following image file types:
- .jpeg
- .svg
- .svgz
- .webp

Sample .svg:

Expand Down
1 change: 1 addition & 0 deletions spec/org-ruby/image_regexp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class DummyRegexp
it { expect(regexp.image_file).to match 'some/path/file.gif' }
it { expect(regexp.image_file).to match 'other.svgz' }
it { expect(regexp.image_file).to match 'tiffany.tiff' }
it { expect(regexp.image_file).to match 'file.webp' }
it { expect(regexp.image_file).to match 'xx.xpm' }
it { expect(regexp.image_file).to match 'yy.xbm' }

Expand Down