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

[PATCH] v5.8.8 pod2html -- incorrect treatment of non-manual page refs like "this(c)" #8816

Closed
p5pRT opened this issue Mar 3, 2007 · 19 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 3, 2007

Migrated from rt.perl.org#41683 (status was 'resolved')

Searchable as RT41683$

@p5pRT
Copy link
Author

p5pRT commented Mar 3, 2007

From @jaalto

Created by jaalto@cante.cante.net

In POD, when there is text like​:

  http(s) call

The pod2html thinks this is a reference to
a Unix manual page like ls(1) and writes to the HTML​:

  <code>http(s)</code> call

SUGGESTION

Please add stricter check how to detect the manual page
references. The text in parentheses housl require a starting number,
like regexp​:

  \S+(\d[A-Za-z])

Which will match

  ls(3C)
  ls(1)
  ls(1M)

PATCH below fixes this​:

=== modified file 'Html.pm'

Inline Patch
--- Html.pm     2007-03-03 16:52:07 +0000
+++ Html.pm     2007-03-03 16:59:48 +0000
@@ -1433,7 +1433,7 @@
        # skip space runs
        next if $word =~ /^\s*$/;
        # see if we can infer a link
-       if( $notinIS && $word =~ /^(\w+)\((.*)\)$/ ) {
+       if( $notinIS && $word =~ /^(\w+)\((\d[a-zA-Z]])\)$/ ) {
            # has parenthesis so should have been a C<> ref
             ## try for a pagename (perlXXX(1))?
             my( $func, $args ) = ( $1, $2 );
Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl v5.8.8:

Configured by Debian Project at Wed Dec  6 23:17:41 UTC 2006.

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=linux, osvers=2.6.18.3, archname=i486-linux-gnu-thread-multi
    uname='linux saens 2.6.18.3 #1 smp sat nov 25 13:39:52 est 2006 i686 gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.8 -Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='4.1.2 20061115 (prerelease) (Debian 4.1.1-20)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=/lib/libc-2.3.6.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8
    gnulibc_version='2.3.6'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.8.8:
    /home/jaalto/var/lib/code/perl
    /etc/perl
    /usr/local/lib/perl/5.8.8
    /usr/local/share/perl/5.8.8
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.8
    /usr/share/perl/5.8
    /usr/local/lib/site_perl
    /usr/local/lib/perl/5.8.7
    /usr/local/share/perl/5.8.7
    /usr/local/lib/perl/5.8.4
    /usr/local/share/perl/5.8.4
    .


Environment for perl v5.8.8:
    HOME=/home/jaalto
    LANG (unset)
    LANGUAGE (unset)
    LC_ALL=en_US
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/bin:/home/jaalto/var/link/bin:/sbin:/bin:/usr/bin:/usr/sbin:/usr/share/bin:/usr/bin/X11:/usr/games
    PERL5LIB=/home/jaalto/var/lib/code/perl
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Mar 3, 2007

From @iabyn

On Sat, Mar 03, 2007 at 09​:05​:11AM -0800, Jari Aalto wrote​:

In POD, when there is text like​:

http\(s\) call

The pod2html thinks this is a reference to
a Unix manual page like ls(1) and writes to the HTML​:

\<code>http\(s\)\</code> call

Um, I thought it was detecting a function call, not a man page.

--
Wesley Crusher gets beaten up by his classmates for being a smarmy git,
and consequently has a go at making some friends of his own age for a
change.
  -- Things That Never Happen in "Star Trek" #18

@p5pRT
Copy link
Author

p5pRT commented Mar 3, 2007

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Mar 4, 2007

From @jandubois

On Sat, 03 Mar 2007, Dave Mitchell wrote​:

On Sat, Mar 03, 2007 at 09​:05​:11AM -0800, Jari Aalto wrote​:

In POD, when there is text like​:

http\(s\) call

The pod2html thinks this is a reference to a Unix manual page like
ls(1) and writes to the HTML​:

\<code>http\(s\)\</code> call

Um, I thought it was detecting a function call, not a man page.

That is correct, and should not be changed.

Cheers,
-Jan

@p5pRT
Copy link
Author

p5pRT commented Mar 5, 2007

From @jaalto

jand@​activestate.com ("Jan Dubois") writes​:

On Sat, 03 Mar 2007, Dave Mitchell wrote​:

On Sat, Mar 03, 2007 at 09​:05​:11AM -0800, Jari Aalto wrote​:

In POD, when there is text like​:

http\(s\) call

The pod2html thinks this is a reference to a Unix manual page like
ls(1) and writes to the HTML​:

\<code>http\(s\)\</code> call

Um, I thought it was detecting a function call, not a man page.

That is correct, and should not be changed.

It is better to add an option to control this, because this is
something that user want's to change. Any suggestions for the option
name?

Jari

@p5pRT
Copy link
Author

p5pRT commented Mar 5, 2007

From @jaalto

A slightly corrected patch. The a-z is not required, but it's
possible in "page(3C)".

=== modified file 'Html.pm'

Inline Patch
--- Html.pm     2007-03-05 08:02:39 +0000
+++ Html.pm     2007-03-05 13:39:38 +0000
@@ -1433,7 +1433,7 @@
        # skip space runs
        next if $word =~ /^\s*$/;
        # see if we can infer a link
-       if( $notinIS && $word =~ /^(\w+)\((.*)\)$/ ) {
+       if( $notinIS && $word =~ /^(\w+)\((\d[a-zA-Z]?)\)$/ ) {
            # has parenthesis so should have been a C<> ref
             ## try for a pagename (perlXXX(1))?
             my( $func, $args ) = ( $1, $2 );

@p5pRT
Copy link
Author

p5pRT commented Mar 5, 2007

From @jaalto

jand@​activestate.com ("Jan Dubois") writes​:

On Sat, 03 Mar 2007, Dave Mitchell wrote​:

On Sat, Mar 03, 2007 at 09​:05​:11AM -0800, Jari Aalto wrote​:

In POD, when there is text like​:

http\(s\) call

The pod2html thinks this is a reference to a Unix manual page like
ls(1) and writes to the HTML​:

\<code>http\(s\)\</code> call

Um, I thought it was detecting a function call, not a man page.

That is correct, and should not be changed.

Another counter argument​:

  The code "tires to guess" a missing C<> call around a point, like in​:

  function(arg)

This is very bad behavior. The code should do minimal guessing and do
it only when the correctness of guessing is very right. Here it is
not.

It is a user's mistake to forget to do write request for special
treatment in POD​:

  C<function(arg)>

Jari

@p5pRT
Copy link
Author

p5pRT commented Mar 5, 2007

From @jaalto

jand@​activestate.com ("Jan Dubois") writes​:

On Sat, 03 Mar 2007, Dave Mitchell wrote​:

On Sat, Mar 03, 2007 at 09​:05​:11AM -0800, Jari Aalto wrote​:

In POD, when there is text like​:

http\(s\) call

The pod2html thinks this is a reference to a Unix manual page like
ls(1) and writes to the HTML​:

\<code>http\(s\)\</code> call

Um, I thought it was detecting a function call, not a man page.

In closer inpection, it's not trying to detect function call, but a
manpage reference. See lines marked with ">>".

  # see if we can infer a link

if( $notinIS && $word =~ /^(\w+)\((.*)\)$/ ) {
  # has parenthesis so should have been a C<> ref
## try for a pagename (perlXXX(1))?
  my( $func, $args ) = ( $1, $2 );
  if( $args =~ /^\d+$/ ){
  my $url = page_sect( $word, '' );
  if( defined $url ){
  $word = "<a href=\"$url\">the $word manpage</a>";
  next;
  }
  }

Jari

@p5pRT
Copy link
Author

p5pRT commented Mar 5, 2007

From @Abigail

On Mon, Mar 05, 2007 at 03​:38​:07PM +0200, Jari Aalto wrote​:

It is a user's mistake to forget to do write request for special
treatment in POD​:

No, it's not. Here's the relevant quote from 'perlpod', which has been
there for as long as I can remember​:

  The Intent

  The intent is simplicity of use, not power of expression.

It's a _feature_, intended from the beginning, that POD does a lot of
"guessing", and the user doesn't have to splatter C<> all over the
documentation.

Abigail

@p5pRT
Copy link
Author

p5pRT commented Mar 5, 2007

From @jaalto

abigail@​abigail.be (Abigail) writes​:

On Mon, Mar 05, 2007 at 03​:38​:07PM +0200, Jari Aalto wrote​:

It is a user's mistake to forget to do write request for special
treatment in POD​:

It's a _feature_, intended from the beginning, that POD does a lot of
"guessing", and the user doesn't have to splatter C<> all over the
documentation.

In this case it is not a feature. The pod2html code was trying to find
manual page references like ls(1), it's intention was never to trying
to find functions calls.

The patch corrects this manual page reference finding "feature".

Jari

@p5pRT
Copy link
Author

p5pRT commented Mar 5, 2007

From @jandubois

On Mon, 05 Mar 2007, Jari Aalto wrote​:

abigail@​abigail.be (Abigail) writes​:

It's a _feature_, intended from the beginning, that POD does a lot of
"guessing", and the user doesn't have to splatter C<> all over the
documentation.

In this case it is not a feature. The pod2html code was trying to find
manual page references like ls(1), it's intention was never to trying
to find functions calls.

The Pod translators have always been supposed to catch function calls
without requiring additional markup. One of the earliest translators
(pod2man) says​:

| Finally, as a general note, try not to use an excessive amount of
| markup. As documented here and in L<Pod​::Man>, you can safely leave
| Perl variables, function names, man page references, and the like
| unadorned by markup and the POD translators will figure it out for
| you. This makes it much easier to later edit the documentation. Note
| that many existing translators (including this one currently) will do
| the wrong thing with e-mail addresses or URLs when wrapped in
| LE<lt>E<gt>, so don't do that.

Note the reference to "function names".

Cheers,
-Jan

@p5pRT
Copy link
Author

p5pRT commented Mar 5, 2007

From @jaalto

jand@​activestate.com ("Jan Dubois") writes​:

On Mon, 05 Mar 2007, Jari Aalto wrote​:

abigail@​abigail.be (Abigail) writes​:

It's a _feature_, intended from the beginning, that POD does a lot of
"guessing", and the user doesn't have to splatter C<> all over the
documentation.

In this case it is not a feature. The pod2html code was trying to find
manual page references like ls(1), it's intention was never to trying
to find functions calls.

The Pod translators have always been supposed to catch function calls
without requiring additional markup. One of the earliest translators
(pod2man) says​:

| Finally, as a general note, try not to use an excessive amount of
| markup. As documented here and in L<Pod​::Man>, you can safely leave
| Perl variables, function names, man page references, and the like
| unadorned by markup and the POD translators will figure it out for
| you. This makes it much easier to later edit the documentation. Note
| that many existing translators (including this one currently) will do
| the wrong thing with e-mail addresses or URLs when wrapped in
| LE<lt>E<gt>, so don't do that.

Note the reference to "function names".

Hm. But is this really the common practise? I mean that the natural
thing to explain how code works is to write verbatim paragraphs. Perl
itself is full of those examples.

  You explain soemthign imprtant her. discuss the issues involved
  etc.

  Then you kick in a verbatim para to show some real code
  how it all fits nicely together.

I would rather leave the automatic guessin for the manual pages only
in outside-of-evrbatim bragraphs. And mark the possibly rara occurrances
of cuntions names with standard

  C<call, that, functions>

Anyway, the existing pod2html does ot handle the function names at all
that well, so this discussion is a kind of silly. It only known a function *if*
if contaains one parameter, like in

  http(s)

And it does not try to deal with

  substr($string, 1, 2)

Can we please drop the issue and accept the patch which does it the
current behavior right. That is -- marking manual pages that are much
more common in non-verbratim paragaphs.

Jari

 

@p5pRT
Copy link
Author

p5pRT commented Mar 5, 2007

From @jandubois

On Mon, 05 Mar 2007, Jari Aalto wrote​:

jand@​activestate.com ("Jan Dubois") writes​:

Note the reference to "function names".

Hm. But is this really the common practise?

Yes, it is. While perlfunc.pod has a lot of redundant C<> markup, it
also contains sections like these​:

| binmode() is not only important for readline() and print() operations,
| but also when using read(), seek(), sysread(), syswrite() and tell()
| (see L<perlport> for more details).

All these empty parenthesis make sure that these will be correctly
formatted and linked as functions.

I mean that the natural thing to explain how code works is to write
verbatim paragraphs. Perl itself is full of those examples.

Note that the auto-markup does *not* apply to verbatim sections, only
to normal paragraphs.

You explain soemthign imprtant her\. discuss the issues involved
etc\.

    Then you kick in a verbatim para to show some real code how it
    all fits nicely together\.

I would rather leave the automatic guessin for the manual pages only
in outside-of-evrbatim bragraphs. And mark the possibly rara
occurrances of cuntions names with standard

I don't understand what you are saying. The code is already disabled in
verbatim paragraphs, so it already does what you say above.

C\<call\, that\, functions>

Anyway, the existing pod2html does ot handle the function names at all
that well, so this discussion is a kind of silly. It only known a
function *if* if contaains one parameter, like in

http\(s\)

And it does not try to deal with

substr\($string\, 1\, 2\)

Can we please drop the issue and accept the patch which does it the
current behavior right. That is -- marking manual pages that are much
more common in non-verbratim paragaphs.

I agree that this is silly, so please leave things as they are!
See, I can play your game too. :)

If you want to change anything, please see if you can auto-detect functions
with more than one parameter in a reliable way without too many false
positives, and then mark them as code references too.

Please don't bother trying to change POD to become just like HTML.
Write your docs in HTML, if that is what you want.

Cheers,
-Jan

@p5pRT
Copy link
Author

p5pRT commented Mar 6, 2007

From @jaalto

jand@​activestate.com ("Jan Dubois") writes​:

Anyway, the existing pod2html does ot handle the function names at all
that well, so this discussion is a kind of silly. It only known a
function *if* if contaains one parameter, like in

http\(s\)

And it does not try to deal with

substr\($string\, 1\, 2\)

I agree that this is silly, so please leave things as they are!
See, I can play your game too. :)

Touche. Heh.

If you want to change anything, please see if you can auto-detect functions
with more than one parameter in a reliable way without too many false
positives, and then mark them as code references too.

Argh. You're now requesting a feature and I was trying to fix broken
implementation.

I propose middle ground​:

  - Mark manual pages (as the code was supposed to be doing)
  - Keep compatibility with empty parentheses calls like in "function()"

Please don't bother trying to change POD to become just like HTML.
Write your docs in HTML, if that is what you want.

I'm using POD for generating the manual pages *.1 and accompanyong
*.html; just where POD was designed for. I once heard a rumour that
the "Programming Perl" was written using POD. If that's true, let's
not narrow the capabilities of pod and go agianst "Larry is right"
principle (=There is more than one way to ...).

Jari

@p5pRT
Copy link
Author

p5pRT commented Mar 6, 2007

From @rgarcia

On 06/03/07, Jari Aalto <jari.aalto@​cante.net> wrote​:

If you want to change anything, please see if you can auto-detect functions
with more than one parameter in a reliable way without too many false
positives, and then mark them as code references too.

Argh. You're now requesting a feature and I was trying to fix broken
implementation.

I propose middle ground​:

  \- Mark manual pages \(as the code was supposed to be doing\)
  \- Keep compatibility with empty parentheses calls like in "function\(\)"

I would like to markup also automatically function($foo) and the like.
So maybe verify that what appears after the ( is a sigil or a digit
(skipping eventually some whitespace). I'll eventually patch Pod​::Html
for that.

I'm using POD for generating the manual pages *.1 and accompanyong
*.html; just where POD was designed for. I once heard a rumour that
the "Programming Perl" was written using POD. If that's true, let's
not narrow the capabilities of pod and go agianst "Larry is right"
principle (=There is more than one way to ...).

Several O'Reilly books have been written in POD. I've reread some :)
But they actually use a custom extension to POD, see
http​://search.cpan.org/dist/Pod-PseudoPod/ for more information. (I
love this name.)

@p5pRT
Copy link
Author

p5pRT commented Mar 7, 2007

From @jaalto

rgarciasuarez@​gmail.com ("Rafael Garcia-Suarez") writes​:

  \- Mark manual pages \(as the code was supposed to be doing\)
  \- Keep compatibility with empty parentheses calls like in "function\(\)"

I would like to markup also automatically function($foo) and the like.
So maybe verify that what appears after the ( is a sigil or a digit
(skipping eventually some whitespace). I'll eventually patch Pod​::Html
for that.

Here is reworked patch.

  - Mark function(), function($foo), function($foo,1,2,3,...)
  Also allow punctuation as a last character "See substr($foo), which ...."
  - Mark manual pages foo(1), foo(1M)
  - add class="man" to HTML for perl manual page refs.

Jari

=== modified file 'Html.pm'

Inline Patch
--- Html.pm     2007-03-05 08:02:39 +0000
+++ Html.pm     2007-03-07 08:39:13 +0000
@@ -1432,15 +1432,20 @@
     foreach my $word (@words) {
        # skip space runs
        next if $word =~ /^\s*$/;
-       # see if we can infer a link
-       if( $notinIS && $word =~ /^(\w+)\((.*)\)$/ ) {
+
+       # see if we can infer a link or function call "substr($var,1,2)"
+        #
+        # NOTE: BEcause this is word based search, it won't automatically
+        # mark "substr($var, 1, 2)" because the 1st word is "substr($var"
+
+       if( $notinIS && $word =~ /^([a-z]\w+)\((\d[a-z]?|[^)]*)\)[.,;]?$/i ) {
            # has parenthesis so should have been a C<> ref
             ## try for a pagename (perlXXX(1))?
             my( $func, $args ) = ( $1, $2 );
             if( $args =~ /^\d+$/ ){
                 my $url = page_sect( $word, '' );
                 if( defined $url ){
-                    $word = "<a href=\"$url\">the $word manpage</a>";
+                    $word = qq(<a href=\"$url\" class="man">the $word manpage</a>);
                     next;
                 }
             }

@p5pRT
Copy link
Author

p5pRT commented Mar 7, 2007

From @jaalto

"Jari Aalto via RT" <perlbug-followup@​perl.org> writes​:

rgarciasuarez@​gmail.com ("Rafael Garcia-Suarez") writes​:

  \- Mark manual pages \(as the code was supposed to be doing\)
  \- Keep compatibility with empty parentheses calls like in "function\(\)"

I would like to markup also automatically function($foo) and the like.
So maybe verify that what appears after the ( is a sigil or a digit
(skipping eventually some whitespace). I'll eventually patch Pod​::Html
for that.

Here is reworked patch.

\- Mark function\(\)\, function\($foo\)\, function\($foo\,1\,2\,3\,\.\.\.\)
  Also allow punctuation as a last character "See substr\($foo\)\, which \.\.\.\."
\- Mark manual pages foo\(1\)\, foo\(1M\) 
\- add class="man" to HTML for perl manual page refs\.

It mistakenly matched "See http(s)". Here is more readable and tighter regexp.

Jari

=== modified file 'Html.pm'

Inline Patch
--- Html.pm     2007-03-05 08:02:39 +0000
+++ Html.pm     2007-03-07 09:07:21 +0000
@@ -1432,20 +1432,37 @@
     foreach my $word (@words) {
        # skip space runs
        next if $word =~ /^\s*$/;
-       # see if we can infer a link
-       if( $notinIS && $word =~ /^(\w+)\((.*)\)$/ ) {
+
+        # see if we can infer a link or function call "substr($var,1,2)"
+        #
+        # NOTE: This is a word based search, it won't automatically
+        # mark "substr($var, 1, 2)" because the 1st word would be "substr($var"
+        # User has to enclose those with proper C<>
+
+       if( $notinIS && $word =~
+            /
+             ^([a-z]\w+)                    # The function name
+             \(
+                  (\d[a-z]?                 # Manual page(1) or page(1M)
+                  |
+                  [^)]*[\$\@\%][^)]+)       # ($foo), (1, @foo), (%hash)
+             \)
+             ([.,;]?)$                      # a possible punctuation follows
+            /xi
+
+           ) {
            # has parenthesis so should have been a C<> ref
             ## try for a pagename (perlXXX(1))?
-            my( $func, $args ) = ( $1, $2 );
+            my( $func, $args, $rest ) = ( $1, $2, $3 || '');
             if( $args =~ /^\d+$/ ){
                 my $url = page_sect( $word, '' );
                 if( defined $url ){
-                    $word = "<a href=\"$url\">the $word manpage</a>";
+                    $word = qq(<a href=\"$url\" class="man">the $word manpage</a>$rest);
                     next;
                 }
             }
             ## try function name for a link, append tt'ed argument list
-            $word = emit_C( $func, '', "($args)");
+            $word = emit_C( $func, '', "($args)") . $rest;

 #### disabled. either all (including $\W, $\w+{.*} etc.) or nothing.
 ##      } elsif( $notinIS && $word =~ /^[\$\@%&*]+\w+$/) {

@p5pRT
Copy link
Author

p5pRT commented Mar 23, 2007

@rgs - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Mar 23, 2007
@p5pRT
Copy link
Author

p5pRT commented Mar 23, 2007

From @rgarcia

On 07/03/07, Jari Aalto <jari.aalto@​cante.net> wrote​:

Here is reworked patch.

\- Mark function\(\)\, function\($foo\)\, function\($foo\,1\,2\,3\,\.\.\.\)
  Also allow punctuation as a last character "See substr\($foo\)\, which \.\.\.\."
\- Mark manual pages foo\(1\)\, foo\(1M\)
\- add class="man" to HTML for perl manual page refs\.

It mistakenly matched "See http(s)". Here is more readable and tighter regexp.

Thanks, I've applied this patch with a few adjustments to the regexp,
as change #30722. Now the regexp matches also function calls without
parameters (foo()) and function names that begin with an _.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant