Project

General

Profile

Actions

Feature #29595

open

Hyperlinks with dash | m-files://

Added by M F over 5 years ago. Updated over 5 years ago.

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

0%

Estimated time:
Resolution:

Description

Hi All,
we started using Redmine in our company and one of problems we have is that we are using MFiles for document sharing - it could be shared as hyperlinks in emails like:

m-files://show/1481067C-D3D8-465B-BE1D-1FC924913B39/0-147851?object=A6DD4B88-47CF-44A8-91AD-35411808231A

Unfortnately Textile or Markdown doesnt seem to dash friendly :)

"Using Textile":m-files://show/1481067C-D3D8-465B-BE1D-1FC924913B39/0-147851?object=A6DD4B88-47CF-44A8-91AD-35411808231A
Using Textile without dash

The problem seems to be dash. How this could be solved? Thank you !


Files

wiki_formatting.rb (6.99 KB) wiki_formatting.rb M F, 2018-09-12 13:56
Actions #1

Updated by M F over 5 years ago

Edited: redmine/lib/redmine/wiki_formatting.rb and when you paste just

m-files://show/1481067C-D3D8-465B-BE1D-1FC924913B39/0-147851?object=A6DD4B88-47CF-44A8-91AD-35411808231A

it makes hyperlink

Change:

module LinksHelper
      AUTO_LINK_RE = %r{
                      (                          # leading text
                        <\w+[^>]*?>|             # leading HTML tag, or
                        [\s\(\[,;]|              # leading punctuation, or
                        ^                        # beginning of line
                      )
                      (
                        (?:https?://)|           # protocol spec, or
                        (?:s?ftps?://)|
                        (?:m-files?://)|         # m-files
                        (?:www\.)                # www.*
                      )
                      (
                        ([^<]\S*?)               # url
                        (\/)?                    # slash
                      )
                      ((?:&gt;)?|[^[:alnum:]_\=\/;\(\)]*?)               # post
                      (?=<|\s|$)
                     }x unless const_defined?(:AUTO_LINK_RE)


And how to support "Title":url syntax?
btw: do I need to "bundle install" each time I edit source code?

Actions

Also available in: Atom PDF