Project

General

Profile

Actions

Defect #15666

closed

Typo in parse_inline_attachments

Added by Ilya S over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Fix typo


Files

Actions #1

Updated by Toshi MARUYAMA over 10 years ago

  • Status changed from New to Closed

It's not typo.
"ext" means "extension" which is "png", "jpeg", etc.

Actions #2

Updated by Ilya S over 10 years ago

why parse extension if its not using?

Actions #3

Updated by Toshi MARUYAMA over 10 years ago

See regexp.
ext <- $2 <- (bmp|gif|jpg|jpe|jpeg|png)

Actions #4

Updated by Ilya S over 10 years ago

I mean ext variable assign, but not using anywhere

Actions #5

Updated by Toshi MARUYAMA over 10 years ago

["test.txt", "test.png"].each do |s|
  s.gsub(/([^\/"]+\.(bmp|gif|jpg|jpe|jpeg|png))/) do |m|
    filename, ext = $1, $2
    puts $2
  end
end
$ ruby a.rb 
png
Actions #6

Updated by Ilya S over 10 years ago

why do you instantiate ext object if you don't use it at all?

Actions

Also available in: Atom PDF