File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -992,14 +992,8 @@ Strike = &{ strike? }
992992         "~~"
993993         { strike a.join }
994994
995- Image = "!" ExplicitLink:a
996-         {
997-           # Extract alt text and URL
998-           alt_text = a[/\{(.*?)\}/, 1] || ""
999-           url = a[/\[(.*?)\]/, 1] || ""
1000- 
1001-           "rdoc-image:#{url}:#{alt_text}"
1002-         }
995+ Image = "!" ExplicitLinkWithLabel:a
996+         { "rdoc-image:#{a[:link]}:#{a[:label]}" }
1003997
1004998Link =  ExplicitLink | ReferenceLink | AutoLink
1005999
@@ -1011,8 +1005,11 @@ ReferenceLinkDouble = Label:content < Spnl > !"[]" Label:label
10111005ReferenceLinkSingle = Label:content < (Spnl "[]")? >
10121006                      { link_to content, content, text }
10131007
1014- ExplicitLink =  Label:l "(" @Sp Source:s Spnl Title @Sp ")"
1015-                 { "{#{l}}[#{s}]" }
1008+ ExplicitLink = ExplicitLinkWithLabel:a
1009+                { "{#{a[:label]}}[#{a[:link]}]" }
1010+ 
1011+ ExplicitLinkWithLabel = Label:label "(" @Sp Source:link Spnl Title @Sp ")"
1012+                         { { label: label, link: link } }
10161013
10171014Source  = ( "<" < SourceContents > ">" | < SourceContents > )
10181015          { text }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments