build(aio): render titles correctly in content pages
If a document provided a title jsdoc tag then its h1 element was being rendered incorrectly as a markdown paragraph. This change renders the title as a markdown h1 tag directly. Fixes #16099
This commit is contained in:
parent
9d40ab9e20
commit
648de7dd86
|
@ -49,6 +49,13 @@ describe('site App', function() {
|
|||
});
|
||||
});
|
||||
|
||||
describe('tutorial docs', () => {
|
||||
it('should not render a paragraph element inside the h1 element', () => {
|
||||
page.navigateTo('tutorial/toh-pt1');
|
||||
expect(element(by.css('h1 p')).isPresent()).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('google analytics', () => {
|
||||
beforeEach(done => page.gaReady.then(done));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% if doc.title %}<h1>{$ doc.title | marked $}</h1>{% endif %}
|
||||
{% if doc.title %}{$ ('# ' + doc.title.trim()) | marked $}{% endif %}
|
||||
<div class="content">
|
||||
{$ doc.description | marked $}
|
||||
</div>
|
Loading…
Reference in New Issue