You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Lukas Theussl <lt...@apache.org> on 2013/04/07 09:12:37 UTC

Re: svn commit: r1465234 - in /maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src: main/java/org/apache/maven/doxia/module/apt/AptParser.java test/java/org/apache/maven/doxia/module/apt/AptParserTest.java

Seems to be a good fix, thanks Robert!

I'm only missing some documentation, could you add an example to 
http://maven.apache.org/doxia/references/doxia-apt.html ?

Cheers,
-Lukas


rfscholte@apache.org wrote:
> Author: rfscholte
> Date: Sat Apr  6 12:21:13 2013
> New Revision: 1465234
>
> URL: http://svn.apache.org/r1465234
> Log:
> [DOXIA-397] Cannot link to javadoc methods
>
> Modified:
>      maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
>      maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java
>
> Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
> URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java?rev=1465234&r1=1465233&r2=1465234&view=diff
> ==============================================================================
> --- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java (original)
> +++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java Sat Apr  6 12:21:13 2013
> @@ -477,7 +477,12 @@ public class AptParser
>                                       logMessage( "ambiguousLink", msg );
>                                   }
>
> -                                if ( !DoxiaUtils.isValidId( hash ) )
> +                                // link##anchor means literal
> +                                if( hash.startsWith( "#" ) )
> +                                {
> +                                    linkAnchor = linkAnchor.substring( 0, hashIndex ) + hash;
> +                                }
> +                                else if ( !DoxiaUtils.isValidId( hash ) )
>                                   {
>                                       linkAnchor =
>                                           linkAnchor.substring( 0, hashIndex ) + "#"
>
> Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java
> URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java?rev=1465234&r1=1465233&r2=1465234&view=diff
> ==============================================================================
> --- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java (original)
> +++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java Sat Apr  6 12:21:13 2013
> @@ -513,6 +513,26 @@ public class AptParserTest
>           assertFalse( it.hasNext() );
>       }
>
> +    public void testLiteralAnchor()
> +        throws Exception
> +    {
> +        // DOXIA-397
> +        String text =
> +            "{{{../apidocs/groovyx/net/http/ParserRegistry.html##parseText(org.apache.http.HttpResponse)}ParserRegistry}}";
> +
> +        SinkEventTestingSink sink = new SinkEventTestingSink();
> +
> +        parser.parse( text, sink );
> +
> +        Iterator<SinkEventElement> it = sink.getEventList().iterator();
> +        assertEquals( it, "head", "head_", "body", "section1", "sectionTitle1" );
> +        assertEquals( it.next(), "link",
> +                      "../apidocs/groovyx/net/http/ParserRegistry.html#parseText(org.apache.http.HttpResponse)" );
> +        assertEquals( it.next(), "text", "ParserRegistry" );
> +        assertEquals( it, "link_", "sectionTitle1_", "section1_", "body_" );
> +        assertFalse( it.hasNext() );
> +    }
> +
>       /** {@inheritDoc} */
>       protected String outputExtension()
>       {
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r1465234 - in /maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src: main/java/org/apache/maven/doxia/module/apt/AptParser.java test/java/org/apache/maven/doxia/module/apt/AptParserTest.java

Posted by Robert Scholte <rf...@apache.org>.
FYI: build is stable again

Robert

Op Sun, 07 Apr 2013 10:39:24 +0200 schreef Robert Scholte  
<rf...@apache.org>:

> Thanks for the feedback.
>
> I thought about discussing this solution first, but there are not that  
> much options without breaking backwards compatibility. And since '##' is  
> illegal, Doxia could very well make use that :)
>
> The site documentation is decoupled from actual sources, it took some  
> time to find it.
> In the end it would have been easier to just use the ASF CMS shortcut.
>
> It seems like I broke some tests according to Jenkins[1]
> My IDE thinks its ok, cmdline doesn't :S
> It has got to do with EOLs
>
> I don't have much time today, but I'll try to fix it, unless someone  
> beats me ;)
>
> Robert
>
> [1]  
> https://builds.apache.org/job/doxia/jdk=JDK%201.5%20(latest),label=Windows/
>
> Op Sun, 07 Apr 2013 09:47:13 +0200 schreef Lukas Theussl  
> <lt...@apache.org>:
>
>>
>> Excellent, I didn't see that. Thanks!
>>
>> -Lukas
>>
>>
>> Hervé BOUTEMY wrote:
>>> yes, I like this nice "new markup" idea too
>>>
>>> Lukas, documentation was added in http://svn.apache.org/r1465238
>>> did you overlooked it or do you have a more precise documentation idea?
>>>
>>> Regards,
>>>
>>> Hervé
>>>
>>> Le dimanche 7 avril 2013 09:12:37 Lukas Theussl a écrit :
>>>> Seems to be a good fix, thanks Robert!
>>>>
>>>> I'm only missing some documentation, could you add an example to
>>>> http://maven.apache.org/doxia/references/doxia-apt.html ?
>>>>
>>>> Cheers,
>>>> -Lukas
>>>>
>>>> rfscholte@apache.org wrote:
>>>>> Author: rfscholte
>>>>> Date: Sat Apr  6 12:21:13 2013
>>>>> New Revision: 1465234
>>>>>
>>>>> URL: http://svn.apache.org/r1465234
>>>>> Log:
>>>>> [DOXIA-397] Cannot link to javadoc methods
>>>>>
>>>>> Modified:
>>>>>       maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/
>>>>>       org/apache/maven/doxia/module/apt/AptParser.java
>>>>>       maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java
>>>>>       /org/apache/maven/doxia/module/apt/AptParserTest.java>
>>>>> Modified:
>>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
>>>>> apache/maven/doxia/module/apt/AptParser.java URL:
>>>>> http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-
>>>>> module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java?
>>>>> rev=1465234&r1=1465233&r2=1465234&view=diff
>>>>> =========================================================================
>>>>> ===== ---
>>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
>>>>> apache/maven/doxia/module/apt/AptParser.java (original) +++
>>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
>>>>> apache/maven/doxia/module/apt/AptParser.java Sat Apr  6 12:21:13  
>>>>> 2013 @@
>>>>> -477,7 +477,12 @@ public class AptParser
>>>>>
>>>>>                                        logMessage( "ambiguousLink",  
>>>>> msg );
>>>>>
>>>>>                                    }
>>>>>
>>>>> -                                if ( !DoxiaUtils.isValidId( hash ) )
>>>>> +                                // link##anchor means literal
>>>>> +                                if( hash.startsWith( "#" ) )
>>>>> +                                {
>>>>> +                                    linkAnchor =  
>>>>> linkAnchor.substring( 0,
>>>>> hashIndex ) + hash; +                                }
>>>>> +                                else if ( !DoxiaUtils.isValidId(  
>>>>> hash ) )
>>>>>
>>>>>                                    {
>>>>>
>>>>>                                        linkAnchor =
>>>>>
>>>>>                                            linkAnchor.substring( 0,
>>>>>                                            hashIndex ) + "#"
>>>>>
>>>>> Modified:
>>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
>>>>> apache/maven/doxia/module/apt/AptParserTest.java URL:
>>>>> http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-
>>>>> module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.j
>>>>> ava?rev=1465234&r1=1465233&r2=1465234&view=diff
>>>>> =========================================================================
>>>>> ===== ---
>>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
>>>>> apache/maven/doxia/module/apt/AptParserTest.java (original) +++
>>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
>>>>> apache/maven/doxia/module/apt/AptParserTest.java Sat Apr  6 12:21:13  
>>>>> 2013
>>>>> @@ -513,6 +513,26 @@ public class AptParserTest
>>>>>
>>>>>            assertFalse( it.hasNext() );
>>>>>
>>>>>        }
>>>>>
>>>>> +    public void testLiteralAnchor()
>>>>> +        throws Exception
>>>>> +    {
>>>>> +        // DOXIA-397
>>>>> +        String text =
>>>>> +
>>>>> "{{{../apidocs/groovyx/net/http/ParserRegistry.html##parseText(org.apache
>>>>> .http.HttpResponse)}ParserRegistry}}"; +
>>>>> +        SinkEventTestingSink sink = new SinkEventTestingSink();
>>>>> +
>>>>> +        parser.parse( text, sink );
>>>>> +
>>>>> +        Iterator<SinkEventElement> it =  
>>>>> sink.getEventList().iterator();
>>>>> +        assertEquals( it, "head", "head_", "body", "section1",
>>>>> "sectionTitle1" ); +        assertEquals( it.next(), "link",
>>>>> +
>>>>> "../apidocs/groovyx/net/http/ParserRegistry.html#parseText(org.apache.htt
>>>>> p.HttpResponse)" ); +        assertEquals( it.next(), "text",
>>>>> "ParserRegistry" );
>>>>> +        assertEquals( it, "link_", "sectionTitle1_", "section1_",  
>>>>> "body_"
>>>>> ); +        assertFalse( it.hasNext() );
>>>>> +    }
>>>>> +
>>>>>
>>>>>        /** {@inheritDoc} */
>>>>>        protected String outputExtension()
>>>>>        {
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r1465234 - in /maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src: main/java/org/apache/maven/doxia/module/apt/AptParser.java test/java/org/apache/maven/doxia/module/apt/AptParserTest.java

Posted by Robert Scholte <rf...@apache.org>.
Thanks for the feedback.

I thought about discussing this solution first, but there are not that  
much options without breaking backwards compatibility. And since '##' is  
illegal, Doxia could very well make use that :)

The site documentation is decoupled from actual sources, it took some time  
to find it.
In the end it would have been easier to just use the ASF CMS shortcut.

It seems like I broke some tests according to Jenkins[1]
My IDE thinks its ok, cmdline doesn't :S
It has got to do with EOLs

I don't have much time today, but I'll try to fix it, unless someone beats  
me ;)

Robert

[1]  
https://builds.apache.org/job/doxia/jdk=JDK%201.5%20(latest),label=Windows/

Op Sun, 07 Apr 2013 09:47:13 +0200 schreef Lukas Theussl  
<lt...@apache.org>:

>
> Excellent, I didn't see that. Thanks!
>
> -Lukas
>
>
> Hervé BOUTEMY wrote:
>> yes, I like this nice "new markup" idea too
>>
>> Lukas, documentation was added in http://svn.apache.org/r1465238
>> did you overlooked it or do you have a more precise documentation idea?
>>
>> Regards,
>>
>> Hervé
>>
>> Le dimanche 7 avril 2013 09:12:37 Lukas Theussl a écrit :
>>> Seems to be a good fix, thanks Robert!
>>>
>>> I'm only missing some documentation, could you add an example to
>>> http://maven.apache.org/doxia/references/doxia-apt.html ?
>>>
>>> Cheers,
>>> -Lukas
>>>
>>> rfscholte@apache.org wrote:
>>>> Author: rfscholte
>>>> Date: Sat Apr  6 12:21:13 2013
>>>> New Revision: 1465234
>>>>
>>>> URL: http://svn.apache.org/r1465234
>>>> Log:
>>>> [DOXIA-397] Cannot link to javadoc methods
>>>>
>>>> Modified:
>>>>       maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/
>>>>       org/apache/maven/doxia/module/apt/AptParser.java
>>>>       maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java
>>>>       /org/apache/maven/doxia/module/apt/AptParserTest.java>
>>>> Modified:
>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
>>>> apache/maven/doxia/module/apt/AptParser.java URL:
>>>> http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-
>>>> module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java?
>>>> rev=1465234&r1=1465233&r2=1465234&view=diff
>>>> =========================================================================
>>>> ===== ---
>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
>>>> apache/maven/doxia/module/apt/AptParser.java (original) +++
>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
>>>> apache/maven/doxia/module/apt/AptParser.java Sat Apr  6 12:21:13 2013  
>>>> @@
>>>> -477,7 +477,12 @@ public class AptParser
>>>>
>>>>                                        logMessage( "ambiguousLink",  
>>>> msg );
>>>>
>>>>                                    }
>>>>
>>>> -                                if ( !DoxiaUtils.isValidId( hash ) )
>>>> +                                // link##anchor means literal
>>>> +                                if( hash.startsWith( "#" ) )
>>>> +                                {
>>>> +                                    linkAnchor =  
>>>> linkAnchor.substring( 0,
>>>> hashIndex ) + hash; +                                }
>>>> +                                else if ( !DoxiaUtils.isValidId(  
>>>> hash ) )
>>>>
>>>>                                    {
>>>>
>>>>                                        linkAnchor =
>>>>
>>>>                                            linkAnchor.substring( 0,
>>>>                                            hashIndex ) + "#"
>>>>
>>>> Modified:
>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
>>>> apache/maven/doxia/module/apt/AptParserTest.java URL:
>>>> http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-
>>>> module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.j
>>>> ava?rev=1465234&r1=1465233&r2=1465234&view=diff
>>>> =========================================================================
>>>> ===== ---
>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
>>>> apache/maven/doxia/module/apt/AptParserTest.java (original) +++
>>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
>>>> apache/maven/doxia/module/apt/AptParserTest.java Sat Apr  6 12:21:13  
>>>> 2013
>>>> @@ -513,6 +513,26 @@ public class AptParserTest
>>>>
>>>>            assertFalse( it.hasNext() );
>>>>
>>>>        }
>>>>
>>>> +    public void testLiteralAnchor()
>>>> +        throws Exception
>>>> +    {
>>>> +        // DOXIA-397
>>>> +        String text =
>>>> +
>>>> "{{{../apidocs/groovyx/net/http/ParserRegistry.html##parseText(org.apache
>>>> .http.HttpResponse)}ParserRegistry}}"; +
>>>> +        SinkEventTestingSink sink = new SinkEventTestingSink();
>>>> +
>>>> +        parser.parse( text, sink );
>>>> +
>>>> +        Iterator<SinkEventElement> it =  
>>>> sink.getEventList().iterator();
>>>> +        assertEquals( it, "head", "head_", "body", "section1",
>>>> "sectionTitle1" ); +        assertEquals( it.next(), "link",
>>>> +
>>>> "../apidocs/groovyx/net/http/ParserRegistry.html#parseText(org.apache.htt
>>>> p.HttpResponse)" ); +        assertEquals( it.next(), "text",
>>>> "ParserRegistry" );
>>>> +        assertEquals( it, "link_", "sectionTitle1_", "section1_",  
>>>> "body_"
>>>> ); +        assertFalse( it.hasNext() );
>>>> +    }
>>>> +
>>>>
>>>>        /** {@inheritDoc} */
>>>>        protected String outputExtension()
>>>>        {
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r1465234 - in /maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src: main/java/org/apache/maven/doxia/module/apt/AptParser.java test/java/org/apache/maven/doxia/module/apt/AptParserTest.java

Posted by Lukas Theussl <lt...@apache.org>.
Excellent, I didn't see that. Thanks!

-Lukas


Hervé BOUTEMY wrote:
> yes, I like this nice "new markup" idea too
>
> Lukas, documentation was added in http://svn.apache.org/r1465238
> did you overlooked it or do you have a more precise documentation idea?
>
> Regards,
>
> Hervé
>
> Le dimanche 7 avril 2013 09:12:37 Lukas Theussl a écrit :
>> Seems to be a good fix, thanks Robert!
>>
>> I'm only missing some documentation, could you add an example to
>> http://maven.apache.org/doxia/references/doxia-apt.html ?
>>
>> Cheers,
>> -Lukas
>>
>> rfscholte@apache.org wrote:
>>> Author: rfscholte
>>> Date: Sat Apr  6 12:21:13 2013
>>> New Revision: 1465234
>>>
>>> URL: http://svn.apache.org/r1465234
>>> Log:
>>> [DOXIA-397] Cannot link to javadoc methods
>>>
>>> Modified:
>>>       maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/
>>>       org/apache/maven/doxia/module/apt/AptParser.java
>>>       maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java
>>>       /org/apache/maven/doxia/module/apt/AptParserTest.java>
>>> Modified:
>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
>>> apache/maven/doxia/module/apt/AptParser.java URL:
>>> http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-
>>> module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java?
>>> rev=1465234&r1=1465233&r2=1465234&view=diff
>>> =========================================================================
>>> ===== ---
>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
>>> apache/maven/doxia/module/apt/AptParser.java (original) +++
>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
>>> apache/maven/doxia/module/apt/AptParser.java Sat Apr  6 12:21:13 2013 @@
>>> -477,7 +477,12 @@ public class AptParser
>>>
>>>                                        logMessage( "ambiguousLink", msg );
>>>
>>>                                    }
>>>
>>> -                                if ( !DoxiaUtils.isValidId( hash ) )
>>> +                                // link##anchor means literal
>>> +                                if( hash.startsWith( "#" ) )
>>> +                                {
>>> +                                    linkAnchor = linkAnchor.substring( 0,
>>> hashIndex ) + hash; +                                }
>>> +                                else if ( !DoxiaUtils.isValidId( hash ) )
>>>
>>>                                    {
>>>
>>>                                        linkAnchor =
>>>
>>>                                            linkAnchor.substring( 0,
>>>                                            hashIndex ) + "#"
>>>
>>> Modified:
>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
>>> apache/maven/doxia/module/apt/AptParserTest.java URL:
>>> http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-
>>> module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.j
>>> ava?rev=1465234&r1=1465233&r2=1465234&view=diff
>>> =========================================================================
>>> ===== ---
>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
>>> apache/maven/doxia/module/apt/AptParserTest.java (original) +++
>>> maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
>>> apache/maven/doxia/module/apt/AptParserTest.java Sat Apr  6 12:21:13 2013
>>> @@ -513,6 +513,26 @@ public class AptParserTest
>>>
>>>            assertFalse( it.hasNext() );
>>>
>>>        }
>>>
>>> +    public void testLiteralAnchor()
>>> +        throws Exception
>>> +    {
>>> +        // DOXIA-397
>>> +        String text =
>>> +
>>> "{{{../apidocs/groovyx/net/http/ParserRegistry.html##parseText(org.apache
>>> .http.HttpResponse)}ParserRegistry}}"; +
>>> +        SinkEventTestingSink sink = new SinkEventTestingSink();
>>> +
>>> +        parser.parse( text, sink );
>>> +
>>> +        Iterator<SinkEventElement> it = sink.getEventList().iterator();
>>> +        assertEquals( it, "head", "head_", "body", "section1",
>>> "sectionTitle1" ); +        assertEquals( it.next(), "link",
>>> +
>>> "../apidocs/groovyx/net/http/ParserRegistry.html#parseText(org.apache.htt
>>> p.HttpResponse)" ); +        assertEquals( it.next(), "text",
>>> "ParserRegistry" );
>>> +        assertEquals( it, "link_", "sectionTitle1_", "section1_", "body_"
>>> ); +        assertFalse( it.hasNext() );
>>> +    }
>>> +
>>>
>>>        /** {@inheritDoc} */
>>>        protected String outputExtension()
>>>        {
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r1465234 - in /maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src: main/java/org/apache/maven/doxia/module/apt/AptParser.java test/java/org/apache/maven/doxia/module/apt/AptParserTest.java

Posted by Hervé BOUTEMY <he...@free.fr>.
yes, I like this nice "new markup" idea too

Lukas, documentation was added in http://svn.apache.org/r1465238
did you overlooked it or do you have a more precise documentation idea?

Regards,

Hervé

Le dimanche 7 avril 2013 09:12:37 Lukas Theussl a écrit :
> Seems to be a good fix, thanks Robert!
> 
> I'm only missing some documentation, could you add an example to
> http://maven.apache.org/doxia/references/doxia-apt.html ?
> 
> Cheers,
> -Lukas
> 
> rfscholte@apache.org wrote:
> > Author: rfscholte
> > Date: Sat Apr  6 12:21:13 2013
> > New Revision: 1465234
> > 
> > URL: http://svn.apache.org/r1465234
> > Log:
> > [DOXIA-397] Cannot link to javadoc methods
> > 
> > Modified:
> >      maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/
> >      org/apache/maven/doxia/module/apt/AptParser.java
> >      maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java
> >      /org/apache/maven/doxia/module/apt/AptParserTest.java> 
> > Modified:
> > maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
> > apache/maven/doxia/module/apt/AptParser.java URL:
> > http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-
> > module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java?
> > rev=1465234&r1=1465233&r2=1465234&view=diff
> > =========================================================================
> > ===== ---
> > maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
> > apache/maven/doxia/module/apt/AptParser.java (original) +++
> > maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/
> > apache/maven/doxia/module/apt/AptParser.java Sat Apr  6 12:21:13 2013 @@
> > -477,7 +477,12 @@ public class AptParser
> > 
> >                                       logMessage( "ambiguousLink", msg );
> >                                   
> >                                   }
> > 
> > -                                if ( !DoxiaUtils.isValidId( hash ) )
> > +                                // link##anchor means literal
> > +                                if( hash.startsWith( "#" ) )
> > +                                {
> > +                                    linkAnchor = linkAnchor.substring( 0,
> > hashIndex ) + hash; +                                }
> > +                                else if ( !DoxiaUtils.isValidId( hash ) )
> > 
> >                                   {
> >                                   
> >                                       linkAnchor =
> >                                       
> >                                           linkAnchor.substring( 0,
> >                                           hashIndex ) + "#"
> > 
> > Modified:
> > maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
> > apache/maven/doxia/module/apt/AptParserTest.java URL:
> > http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-
> > module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.j
> > ava?rev=1465234&r1=1465233&r2=1465234&view=diff
> > =========================================================================
> > ===== ---
> > maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
> > apache/maven/doxia/module/apt/AptParserTest.java (original) +++
> > maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/
> > apache/maven/doxia/module/apt/AptParserTest.java Sat Apr  6 12:21:13 2013
> > @@ -513,6 +513,26 @@ public class AptParserTest
> > 
> >           assertFalse( it.hasNext() );
> >       
> >       }
> > 
> > +    public void testLiteralAnchor()
> > +        throws Exception
> > +    {
> > +        // DOXIA-397
> > +        String text =
> > +           
> > "{{{../apidocs/groovyx/net/http/ParserRegistry.html##parseText(org.apache
> > .http.HttpResponse)}ParserRegistry}}"; +
> > +        SinkEventTestingSink sink = new SinkEventTestingSink();
> > +
> > +        parser.parse( text, sink );
> > +
> > +        Iterator<SinkEventElement> it = sink.getEventList().iterator();
> > +        assertEquals( it, "head", "head_", "body", "section1",
> > "sectionTitle1" ); +        assertEquals( it.next(), "link",
> > +                     
> > "../apidocs/groovyx/net/http/ParserRegistry.html#parseText(org.apache.htt
> > p.HttpResponse)" ); +        assertEquals( it.next(), "text",
> > "ParserRegistry" );
> > +        assertEquals( it, "link_", "sectionTitle1_", "section1_", "body_"
> > ); +        assertFalse( it.hasNext() );
> > +    }
> > +
> > 
> >       /** {@inheritDoc} */
> >       protected String outputExtension()
> >       {
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org