File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -203,8 +203,8 @@ export const tagHandlers: Record<string, TagHandler> = {
203203 return ''
204204 }
205205 let prefix = ''
206- // no link was emitting, try and use aria label or title
207- if ( state . buffer [ state . buffer . length - 1 ] === '[' ) {
206+ // no text children were emitted - should try use fallback
207+ if ( ! node . childTextNodeIndex ) {
208208 prefix = node . attributes ?. title || node . attributes ?. [ 'aria-label' ] || ''
209209 }
210210 const href = resolveUrl ( node . attributes ?. href || '' , state . options ?. origin )
Original file line number Diff line number Diff line change @@ -60,14 +60,15 @@ export interface Node {
6060
6161 /** Current walk index for child traversal */
6262 currentWalkIndex : number
63+
64+ /** The text child nodes of the parent node */
65+ childTextNodeIndex : number
6366}
6467
6568/**
6669 * Parent node that can contain child nodes
6770 */
6871export interface ParentNode extends Node {
69- /** The text child nodes of the parent node */
70- childTextNodeIndex : number
7172
7273 /** Child nodes (not used in streaming mode) */
7374 children ?: Node [ ]
You can’t perform that action at this time.
0 commit comments