Project

General

Profile

Actions

Defect #15666

closed

Typo in parse_inline_attachments

Defect #15666: Typo in parse_inline_attachments

Added by Ilya S almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Resolution:
Affected version:

Description

Fix typo


Files

Updated by Toshi MARUYAMA almost 13 years ago Actions #1

  • Status changed from New to Closed

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

Updated by Ilya S almost 13 years ago Actions #2

why parse extension if its not using?

Updated by Toshi MARUYAMA almost 13 years ago Actions #3

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

Updated by Ilya S almost 13 years ago Actions #4

I mean ext variable assign, but not using anywhere

Updated by Toshi MARUYAMA almost 13 years ago Actions #5

["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

Updated by Ilya S almost 13 years ago Actions #6

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

Actions

Also available in: PDF Atom