Skip to content

Commit ee3c4b4

Browse files
committed
[clang-doc] Make --repository change the HTML output
The current check in writeFileDefinition() is incorrect, and prevents us from ever emitting the URL from the clang-doc tool. The unit tests do test this, but call the API directly circumventing the check. This is the first step towards addressing #59814.
1 parent fcf9e19 commit ee3c4b4

File tree

4 files changed

+183
-124
lines changed

4 files changed

+183
-124
lines changed

clang-tools-extra/clang-doc/HTMLGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ genReferencesBlock(const std::vector<Reference> &References,
494494
static std::unique_ptr<TagNode>
495495
writeFileDefinition(const Location &L,
496496
std::optional<StringRef> RepositoryUrl = std::nullopt) {
497-
if (!L.IsFileInRootDir || !RepositoryUrl)
497+
if (!L.IsFileInRootDir && !RepositoryUrl)
498498
return std::make_unique<TagNode>(
499499
HTMLTag::TAG_P, "Defined at line " + std::to_string(L.LineNumber) +
500500
" of file " + L.Filename);

clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Circle.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ double Circle::area() const {
88

99
double Circle::perimeter() const {
1010
return 3.141 * radius_;
11-
}
11+
}
12+

clang-tools-extra/test/clang-doc/basic-project.test

Lines changed: 174 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -54,130 +54,183 @@
5454
// JSON-INDEX-NEXT: };
5555
// JSON-INDEX-NEXT: }
5656

57-
// HTML-SHAPE: <h1>class Shape</h1>
58-
// HTML-SHAPE: <p>Defined at line 8 of file {{.*}}Shape.h</p>
59-
// HTML-SHAPE: <div>brief</div>
60-
// HTML-SHAPE: <p> Abstract base class for shapes.</p>
61-
// HTML-SHAPE: <p> Provides a common interface for different types of shapes.</p>
62-
// HTML-SHAPE: <h2 id="Functions">Functions</h2>
63-
// HTML-SHAPE: <h3 id="{{([0-9A-F]{40})}}">area</h3>
64-
// HTML-SHAPE: <p>public double area()</p>
65-
// HTML-SHAPE: <div>brief</div>
66-
// HTML-SHAPE: <p> Calculates the area of the shape.</p>
67-
// HTML-SHAPE: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>
68-
// HTML-SHAPE: <p>public double perimeter()</p>
69-
// HTML-SHAPE: <div>brief</div>
70-
// HTML-SHAPE: <p> Calculates the perimeter of the shape.</p>
71-
// HTML-SHAPE: <div>return</div>
72-
// HTML-SHAPE: <p> double The perimeter of the shape.</p>
73-
// HTML-SHAPE: <h3 id="{{([0-9A-F]{40})}}">~Shape</h3>
74-
// HTML-SHAPE: <p>public void ~Shape()</p>
75-
// HTML-SHAPE: <p>Defined at line 13 of file {{.*}}Shape.h</p>
76-
// HTML-SHAPE: <div>brief</div>
77-
// HTML-SHAPE: <p> Virtual destructor.</p>
57+
// HTML-SHAPE: <h1>class Shape</h1>
58+
// HTML-SHAPE-NEXT: <p>
59+
// HTML-SHAPE-NEXT: Defined at line
60+
// HTML-SHAPE-NEXT: <a href="https://repository.com/./include/Shape.h#8">8</a>
61+
// HTML-SHAPE-NEXT: of file
62+
// HTML-SHAPE-NEXT: <a href="https://repository.com/./include/Shape.h">Shape.h</a>
63+
// HTML-SHAPE-NEXT: </p>
64+
// HTML-SHAPE: <div>brief</div>
65+
// HTML-SHAPE: <p> Abstract base class for shapes.</p>
66+
// HTML-SHAPE: <p> Provides a common interface for different types of shapes.</p>
67+
// HTML-SHAPE: <h2 id="Functions">Functions</h2>
68+
// HTML-SHAPE: <h3 id="{{([0-9A-F]{40})}}">area</h3>
69+
// HTML-SHAPE: <p>public double area()</p>
70+
// HTML-SHAPE: <div>brief</div>
71+
// HTML-SHAPE: <p> Calculates the area of the shape.</p>
72+
// HTML-SHAPE: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>
73+
// HTML-SHAPE: <p>public double perimeter()</p>
74+
// HTML-SHAPE: <div>brief</div>
75+
// HTML-SHAPE: <p> Calculates the perimeter of the shape.</p>
76+
// HTML-SHAPE: <div>return</div>
77+
// HTML-SHAPE: <p> double The perimeter of the shape.</p>
78+
// HTML-SHAPE: <h3 id="{{([0-9A-F]{40})}}">~Shape</h3>
79+
// HTML-SHAPE: <p>public void ~Shape()</p>
80+
// HTML-SHAPE: Defined at line
81+
// HTML-SHAPE-NEXT: <a href="https://repository.com/./include/Shape.h#13">13</a>
82+
// HTML-SHAPE-NEXT: of file
83+
// HTML-SHAPE-NEXT: <a href="https://repository.com/./include/Shape.h">Shape.h</a>
84+
// HTML-SHAPE: <div>brief</div>
85+
// HTML-SHAPE: <p> Virtual destructor.</p>
7886

79-
// HTML-CALC: <h1>class Calculator</h1>
80-
// HTML-CALC: <p>Defined at line 8 of file {{.*}}Calculator.h</p>
81-
// HTML-CALC: <div>brief</div>
82-
// HTML-CALC: <p> A simple calculator class.</p>
83-
// HTML-CALC: <p> Provides basic arithmetic operations.</p>
84-
// HTML-CALC: <h2 id="Functions">Functions</h2>
85-
// HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">add</h3>
86-
// HTML-CALC: <p>public int add(int a, int b)</p>
87-
// HTML-CALC: <p>Defined at line 3 of file {{.*}}Calculator.cpp</p>
88-
// HTML-CALC: <div>brief</div>
89-
// HTML-CALC: <p> Adds two integers.</p>
90-
// HTML-CALC: <div>return</div>
91-
// HTML-CALC: <p> int The sum of a and b.</p>
92-
// HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">subtract</h3>
93-
// HTML-CALC: <p>public int subtract(int a, int b)</p>
94-
// HTML-CALC: <p>Defined at line 7 of file {{.*}}Calculator.cpp</p>
95-
// HTML-CALC: <div>brief</div>
96-
// HTML-CALC: <p> Subtracts the second integer from the first.</p>
97-
// HTML-CALC: <div>return</div>
98-
// HTML-CALC: <p> int The result of a - b.</p>
99-
// HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">multiply</h3>
100-
// HTML-CALC: <p>public int multiply(int a, int b)</p>
101-
// HTML-CALC: <p>Defined at line 11 of file {{.*}}Calculator.cpp</p>
102-
// HTML-CALC: <div>brief</div>
103-
// HTML-CALC: <p> Multiplies two integers.</p>
104-
// HTML-CALC: <div>return</div>
105-
// HTML-CALC: <p> int The product of a and b.</p>
106-
// HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">divide</h3>
107-
// HTML-CALC: <p>public double divide(int a, int b)</p>
108-
// HTML-CALC: <p>Defined at line 15 of file {{.*}}Calculator.cpp</p>
109-
// HTML-CALC: <div>brief</div>
110-
// HTML-CALC: <p> Divides the first integer by the second.</p>
111-
// HTML-CALC: <div>return</div>
112-
// HTML-CALC: <p> double The result of a / b.</p>
113-
// HTML-CALC: <div>throw</div>
114-
// HTML-CALC: <p>if b is zero.</p>
87+
// HTML-CALC: <h1>class Calculator</h1>
88+
// HTML-CALC-NEXT: <p>
89+
// HTML-CALC-NEXT: Defined at line
90+
// HTML-CALC-NEXT: <a href="https://repository.com/./include/Calculator.h#8">8</a>
91+
// HTML-CALC-NEXT: of file
92+
// HTML-CALC-NEXT: <a href="https://repository.com/./include/Calculator.h">Calculator.h</a>
93+
// HTML-CALC-NEXT: </p>
94+
// HTML-CALC: <div>brief</div>
95+
// HTML-CALC: <p> A simple calculator class.</p>
96+
// HTML-CALC: <p> Provides basic arithmetic operations.</p>
97+
// HTML-CALC: <h2 id="Functions">Functions</h2>
98+
// HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">add</h3>
99+
// HTML-CALC: <p>public int add(int a, int b)</p>
100+
// HTML-CALC: Defined at line
101+
// HTML-CALC-NEXT: <a href="https://repository.com/./src/Calculator.cpp#3">3</a>
102+
// HTML-CALC-NEXT: of file
103+
// HTML-CALC-NEXT: <a href="https://repository.com/./src/Calculator.cpp">Calculator.cpp</a>
104+
// HTML-CALC: <div>brief</div>
105+
// HTML-CALC: <p> Adds two integers.</p>
106+
// HTML-CALC: <div>return</div>
107+
// HTML-CALC: <p> int The sum of a and b.</p>
108+
// HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">subtract</h3>
109+
// HTML-CALC: <p>public int subtract(int a, int b)</p>
110+
// HTML-CALC: Defined at line
111+
// HTML-CALC-NEXT: <a href="https://repository.com/./src/Calculator.cpp#7">7</a>
112+
// HTML-CALC-NEXT: of file
113+
// HTML-CALC-NEXT: <a href="https://repository.com/./src/Calculator.cpp">Calculator.cpp</a>
114+
// HTML-CALC: <div>brief</div>
115+
// HTML-CALC: <p> Subtracts the second integer from the first.</p>
116+
// HTML-CALC: <div>return</div>
117+
// HTML-CALC: <p> int The result of a - b.</p>
118+
// HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">multiply</h3>
119+
// HTML-CALC: <p>public int multiply(int a, int b)</p>
120+
// HTML-CALC: Defined at line
121+
// HTML-CALC-NEXT: <a href="https://repository.com/./src/Calculator.cpp#11">11</a>
122+
// HTML-CALC-NEXT: of file
123+
// HTML-CALC-NEXT: <a href="https://repository.com/./src/Calculator.cpp">Calculator.cpp</a>
124+
// HTML-CALC: <div>brief</div>
125+
// HTML-CALC: <p> Multiplies two integers.</p>
126+
// HTML-CALC: <div>return</div>
127+
// HTML-CALC: <p> int The product of a and b.</p>
128+
// HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">divide</h3>
129+
// HTML-CALC: <p>public double divide(int a, int b)</p>
130+
// HTML-CALC: Defined at line
131+
// HTML-CALC-NEXT: <a href="https://repository.com/./src/Calculator.cpp#15">15</a>
132+
// HTML-CALC-NEXT: of file
133+
// HTML-CALC-NEXT: <a href="https://repository.com/./src/Calculator.cpp">Calculator.cpp</a>
134+
// HTML-CALC: <div>brief</div>
135+
// HTML-CALC: <p> Divides the first integer by the second.</p>
136+
// HTML-CALC: <div>return</div>
137+
// HTML-CALC: <p> double The result of a / b.</p>
138+
// HTML-CALC: <div>throw</div>
139+
// HTML-CALC: <p>if b is zero.</p>
115140

116-
// HTML-RECTANGLE: <h1>class Rectangle</h1>
117-
// HTML-RECTANGLE: <p>Defined at line 10 of file {{.*}}Rectangle.h</p>
118-
// HTML-RECTANGLE: <p> Represents a rectangle with a given width and height.</p
119-
// HTML-RECTANGLE: <p>
120-
// HTML-RECTANGLE: Inherits from
121-
// HTML-RECTANGLE: <a href="Shape.html">Shape</a>
122-
// HTML-RECTANGLE: </p>
123-
// HTML-RECTANGLE: <h2 id="Members">Members</h2>
124-
// HTML-RECTANGLE: <p> Width of the rectangle.</p>
125-
// HTML-RECTANGLE: <div>private double width_</div>
126-
// HTML-RECTANGLE: <p> Height of the rectangle.</p>
127-
// HTML-RECTANGLE: <div>private double height_</div>
128-
// HTML-RECTANGLE: <h2 id="Functions">Functions</h2>
129-
// HTML-RECTANGLE: <h3 id="{{([0-9A-F]{40})}}">Rectangle</h3>
130-
// HTML-RECTANGLE: <p>public void Rectangle(double width, double height)</p>
131-
// HTML-RECTANGLE: <p>Defined at line 3 of file {{.*}}Rectangle.cpp</p>
132-
// HTML-RECTANGLE: <div>brief</div>
133-
// HTML-RECTANGLE: <p> Constructs a new Rectangle object.</p>
134-
// HTML-RECTANGLE: <h3 id="{{([0-9A-F]{40})}}">area</h3>
135-
// HTML-RECTANGLE: <p>public double area()</p>
136-
// HTML-RECTANGLE: <p>Defined at line 6 of file {{.*}}Rectangle.cpp</p>
137-
// HTML-RECTANGLE: <div>brief</div>
138-
// HTML-RECTANGLE: <p> Calculates the area of the rectangle.</p>
139-
// HTML-RECTANGLE: <div>return</div>
140-
// HTML-RECTANGLE: <p> double The area of the rectangle.</p>
141-
// HTML-RECTANGLE: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>
142-
// HTML-RECTANGLE: <p>public double perimeter()</p>
143-
// HTML-RECTANGLE: <p>Defined at line 10 of file {{.*}}Rectangle.cpp</p>
144-
// HTML-RECTANGLE: <div>brief</div>
145-
// HTML-RECTANGLE: <p> Calculates the perimeter of the rectangle.</p>
146-
// HTML-RECTANGLE: <div>return</div>
147-
// HTML-RECTANGLE: <p> double The perimeter of the rectangle.</p>
141+
// HTML-RECTANGLE: <h1>class Rectangle</h1>
142+
// HTML-RECTANGLE-NEXT: <p>
143+
// HTML-RECTANGLE-NEXT: Defined at line
144+
// HTML-RECTANGLE-NEXT: <a href="https://repository.com/./include/Rectangle.h#10">10</a>
145+
// HTML-RECTANGLE-NEXT: of file
146+
// HTML-RECTANGLE-NEXT: <a href="https://repository.com/./include/Rectangle.h">Rectangle.h</a>
147+
// HTML-RECTANGLE-NEXT: </p>
148+
// HTML-RECTANGLE: <p> Represents a rectangle with a given width and height.</p>
149+
// HTML-RECTANGLE: <p>
150+
// HTML-RECTANGLE: Inherits from
151+
// HTML-RECTANGLE: <a href="Shape.html">Shape</a>
152+
// HTML-RECTANGLE: </p>
153+
// HTML-RECTANGLE: <h2 id="Members">Members</h2>
154+
// HTML-RECTANGLE: <p> Width of the rectangle.</p>
155+
// HTML-RECTANGLE: <div>private double width_</div>
156+
// HTML-RECTANGLE: <p> Height of the rectangle.</p>
157+
// HTML-RECTANGLE: <div>private double height_</div>
158+
// HTML-RECTANGLE: <h2 id="Functions">Functions</h2>
159+
// HTML-RECTANGLE: <h3 id="{{([0-9A-F]{40})}}">Rectangle</h3>
160+
// HTML-RECTANGLE: <p>public void Rectangle(double width, double height)</p>
161+
// HTML-RECTANGLE: Defined at line
162+
// HTML-RECTANGLE-NEXT: <a href="https://repository.com/./src/Rectangle.cpp#3">3</a>
163+
// HTML-RECTANGLE-NEXT: of file
164+
// HTML-RECTANGLE-NEXT: <a href="https://repository.com/./src/Rectangle.cpp">Rectangle.cpp</a>
165+
// HTML-RECTANGLE: <div>brief</div>
166+
// HTML-RECTANGLE: <p> Constructs a new Rectangle object.</p>
167+
// HTML-RECTANGLE: <h3 id="{{([0-9A-F]{40})}}">area</h3>
168+
// HTML-RECTANGLE: <p>public double area()</p>
169+
// HTML-RECTANGLE: Defined at line
170+
// HTML-RECTANGLE-NEXT: <a href="https://repository.com/./src/Rectangle.cpp#6">6</a>
171+
// HTML-RECTANGLE-NEXT: of file
172+
// HTML-RECTANGLE-NEXT: <a href="https://repository.com/./src/Rectangle.cpp">Rectangle.cpp</a>
173+
// HTML-RECTANGLE: <div>brief</div>
174+
// HTML-RECTANGLE: <p> Calculates the area of the rectangle.</p>
175+
// HTML-RECTANGLE: <div>return</div>
176+
// HTML-RECTANGLE: <p> double The area of the rectangle.</p>
177+
// HTML-RECTANGLE: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>
178+
// HTML-RECTANGLE: <p>public double perimeter()</p>
179+
// HTML-RECTANGLE: Defined at line
180+
// HTML-RECTANGLE-NEXT: <a href="https://repository.com/./src/Rectangle.cpp#10">10</a>
181+
// HTML-RECTANGLE-NEXT: of file
182+
// HTML-RECTANGLE-NEXT: <a href="https://repository.com/./src/Rectangle.cpp">Rectangle.cpp</a>
183+
// HTML-RECTANGLE: <div>brief</div>
184+
// HTML-RECTANGLE: <p> Calculates the perimeter of the rectangle.</p>
185+
// HTML-RECTANGLE: <div>return</div>
186+
// HTML-RECTANGLE: <p> double The perimeter of the rectangle.</p>
148187

149-
// HTML-CIRCLE: <h1>class Circle</h1>
150-
// HTML-CIRCLE: <p>Defined at line 10 of file {{.*}}Circle.h</p>
151-
// HTML-CIRCLE: <div>brief</div>
152-
// HTML-CIRCLE: <p> Circle class derived from Shape.</p>
153-
// HTML-CIRCLE: <p> Represents a circle with a given radius.</p>
154-
// HTML-CIRCLE: <p>
155-
// HTML-CIRCLE: Inherits from
156-
// HTML-CIRCLE: <a href="Shape.html">Shape</a>
157-
// HTML-CIRCLE: </p>
158-
// HTML-CIRCLE: <h2 id="Members">Members</h2>
159-
// HTML-CIRCLE: <p> Radius of the circle.</p>
160-
// HTML-CIRCLE: <div>private double radius_</div>
161-
// HTML-CIRCLE: <h2 id="Functions">Functions</h2>
162-
// HTML-CIRCLE: <h3 id="{{([0-9A-F]{40})}}">Circle</h3>
163-
// HTML-CIRCLE: <p>public void Circle(double radius)</p>
164-
// HTML-CIRCLE: <p>Defined at line 3 of file {{.*}}Circle.cpp</p>
165-
// HTML-CIRCLE: <div>brief</div>
166-
// HTML-CIRCLE: <p> Constructs a new Circle object.</p>
167-
// HTML-CIRCLE: <h3 id="{{([0-9A-F]{40})}}">area</h3>
168-
// HTML-CIRCLE: <p>public double area()</p>
169-
// HTML-CIRCLE: <p>Defined at line 5 of file {{.*}}Circle.cpp</p>
170-
// HTML-CIRCLE: <div>brief</div>
171-
// HTML-CIRCLE: <p> Calculates the area of the circle.</p>
172-
// HTML-CIRCLE: <div>return</div>
173-
// HTML-CIRCLE: <p> double The area of the circle.</p>
174-
// HTML-CIRCLE: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>
175-
// HTML-CIRCLE: <p>public double perimeter()</p>
176-
// HTML-CIRCLE: <p>Defined at line 9 of file {{.*}}Circle.cpp</p>
177-
// HTML-CIRCLE: <div>brief</div>
178-
// HTML-CIRCLE: <p> Calculates the perimeter of the circle.</p>
179-
// HTML-CIRCLE: <div>return</div>
180-
// HTML-CIRCLE: <p> double The perimeter of the circle.</p>
188+
// HTML-CIRCLE: <h1>class Circle</h1>
189+
// HTML-CIRCLE-NEXT: <p>
190+
// HTML-CIRCLE-NEXT: Defined at line
191+
// HTML-CIRCLE-NEXT: <a href="https://repository.com/./include/Circle.h#10">10</a>
192+
// HTML-CIRCLE-NEXT: of file
193+
// HTML-CIRCLE-NEXT: <a href="https://repository.com/./include/Circle.h">Circle.h</a>
194+
// HTML-CIRCLE-NEXT: </p>
195+
// HTML-CIRCLE: <div>brief</div>
196+
// HTML-CIRCLE: <p> Circle class derived from Shape.</p>
197+
// HTML-CIRCLE: <p> Represents a circle with a given radius.</p>
198+
// HTML-CIRCLE: <p>
199+
// HTML-CIRCLE: Inherits from
200+
// HTML-CIRCLE: <a href="Shape.html">Shape</a>
201+
// HTML-CIRCLE: </p>
202+
// HTML-CIRCLE: <h2 id="Members">Members</h2>
203+
// HTML-CIRCLE: <p> Radius of the circle.</p>
204+
// HTML-CIRCLE: <div>private double radius_</div>
205+
// HTML-CIRCLE: <h2 id="Functions">Functions</h2>
206+
// HTML-CIRCLE: <h3 id="{{([0-9A-F]{40})}}">Circle</h3>
207+
// HTML-CIRCLE: <p>public void Circle(double radius)</p>
208+
// HTML-CIRCLE: Defined at line
209+
// HTML-CIRCLE-NEXT: <a href="https://repository.com/./src/Circle.cpp#3">3</a>
210+
// HTML-CIRCLE-NEXT: of file
211+
// HTML-CIRCLE-NEXT: <a href="https://repository.com/./src/Circle.cpp">Circle.cpp</a>
212+
// HTML-CIRCLE: <div>brief</div>
213+
// HTML-CIRCLE: <p> Constructs a new Circle object.</p>
214+
// HTML-CIRCLE: <h3 id="{{([0-9A-F]{40})}}">area</h3>
215+
// HTML-CIRCLE: <p>public double area()</p>
216+
// HTML-CIRCLE: Defined at line
217+
// HTML-CIRCLE-NEXT: <a href="https://repository.com/./src/Circle.cpp#5">5</a>
218+
// HTML-CIRCLE-NEXT: of file
219+
// HTML-CIRCLE-NEXT: <a href="https://repository.com/./src/Circle.cpp">Circle.cpp</a>
220+
// HTML-CIRCLE: <div>brief</div>
221+
// HTML-CIRCLE: <p> Calculates the area of the circle.</p>
222+
// HTML-CIRCLE: <div>return</div>
223+
// HTML-CIRCLE: <p> double The area of the circle.</p>
224+
// HTML-CIRCLE: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>
225+
// HTML-CIRCLE: <p>public double perimeter()</p>
226+
// HTML-CIRCLE: Defined at line
227+
// HTML-CIRCLE-NEXT: <a href="https://repository.com/./src/Circle.cpp#9">9</a>
228+
// HTML-CIRCLE-NEXT: of file
229+
// HTML-CIRCLE-NEXT: <a href="https://repository.com/./src/Circle.cpp">Circle.cpp</a>
230+
// HTML-CIRCLE: <div>brief</div>
231+
// HTML-CIRCLE: <p> Calculates the perimeter of the circle.</p>
232+
// HTML-CIRCLE: <div>return</div>
233+
// HTML-CIRCLE: <p> double The perimeter of the circle.</p>
181234

182235
// MD-CALC: # class Calculator
183236
// MD-CALC: *Defined at .{{[\/]}}include{{[\/]}}Calculator.h#8*

clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,12 @@ TEST(HTMLGeneratorTest, emitFunctionHTML) {
319319
<a href="path/to/int.html">int</a>
320320
P)
321321
</p>
322-
<p>Defined at line 10 of file dir/test.cpp</p>
322+
<p>
323+
Defined at line
324+
<a href="https://www.repository.com/dir/test.cpp#10">10</a>
325+
of file
326+
<a href="https://www.repository.com/dir/test.cpp">test.cpp</a>
327+
</p>
323328
</div>
324329
<div id="sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right"></div>
325330
</main>

0 commit comments

Comments
 (0)