File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -59,11 +59,12 @@ export class ContentItem extends React.Component<ContentItemProps> {
59
59
export class TagItem extends React . Component < ContentItemProps > {
60
60
render ( ) {
61
61
const { name, description } = this . props . item ;
62
+ const hash = this . props . item . getHash ( ) ;
62
63
return (
63
64
< Row >
64
65
< MiddlePanel key = "middle" >
65
- < H1 >
66
- < ShareLink href = { '#' + this . props . item . getHash ( ) } />
66
+ < H1 id = { hash } >
67
+ < ShareLink href = { '#' + hash } />
67
68
{ name }
68
69
</ H1 >
69
70
{ description !== undefined && < Markdown source = { description } /> }
Original file line number Diff line number Diff line change @@ -44,12 +44,12 @@ export class Operation extends ComponentWithOptions<OperationProps> {
44
44
45
45
const { name : summary , description, deprecated } = operation ;
46
46
const pathInMiddle = this . options . pathInMiddlePanel ;
47
-
47
+ const hash = operation . getHash ( ) ;
48
48
return (
49
49
< OperationRow >
50
50
< MiddlePanel >
51
- < H2 >
52
- < ShareLink href = { '#' + operation . getHash ( ) } />
51
+ < H2 id = { hash } >
52
+ < ShareLink href = { '#' + hash } />
53
53
{ summary } { deprecated && < Badge type = "warning" > Deprecated </ Badge > }
54
54
</ H2 >
55
55
{ pathInMiddle && < Endpoint operation = { operation } inverted = { true } /> }
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export class SecurityDefs extends React.PureComponent<SecurityDefsProps> {
82
82
< div >
83
83
{ this . props . securitySchemes . schemes . map ( scheme => (
84
84
< div data-section-id = { scheme . sectionId } key = { scheme . id } >
85
- < H2 >
85
+ < H2 id = { scheme . sectionId } >
86
86
< ShareLink href = { '#' + scheme . sectionId } />
87
87
{ scheme . id }
88
88
</ H2 >
Original file line number Diff line number Diff line change @@ -90,14 +90,14 @@ export class MarkdownRenderer {
90
90
let id = this . currentTopHeading . id ;
91
91
return (
92
92
`<a name="${ id } "></a>` +
93
- `<h${ tokens [ idx ] . hLevel } ${ SECTION_ATTR } ="${ id } ">` +
93
+ `<h${ tokens [ idx ] . hLevel } ${ SECTION_ATTR } ="${ id } " id=" ${ id } " >` +
94
94
`<a class="share-link" href="#${ id } "></a>`
95
95
) ;
96
96
} else if ( tokens [ idx ] . hLevel === 2 ) {
97
97
let { id } = this . saveHeading ( content , this . currentTopHeading . items ) ;
98
98
return (
99
99
`<a name="${ id } "></a>` +
100
- `<h${ tokens [ idx ] . hLevel } ${ SECTION_ATTR } ="${ id } ">` +
100
+ `<h${ tokens [ idx ] . hLevel } ${ SECTION_ATTR } ="${ id } " id=" ${ id } " >` +
101
101
`<a class="share-link" href="#${ id } "></a>`
102
102
) ;
103
103
}
You can’t perform that action at this time.
0 commit comments