feat(aio): add GH-style anchor links to headings (#16161)

Closes #16126

PR Close #16161
This commit is contained in:
Peter Bacon Darwin
2017-04-19 16:03:15 +01:00
committed by Miško Hevery
parent 1bfa7c6f14
commit 1e848d696b
8 changed files with 94 additions and 7 deletions

View File

@ -12,7 +12,7 @@ module.exports = function fixInternalDocumentLinks() {
return {
$runAfter: ['inlineTagProcessor'],
$runBefore: ['writeFilesProcessor'],
$runBefore: ['convertToJsonProcessor'],
$process: function(docs) {
docs.forEach(doc => {
doc.renderedContent = doc.renderedContent.replace(INTERNAL_LINK, (_, pre, hash) => {

View File

@ -13,7 +13,7 @@ describe('fixInternalDocumentLinks processor', () => {
it('should run before the correct processor', () => {
const processor = processorFactory();
expect(processor.$runBefore).toEqual(['writeFilesProcessor']);
expect(processor.$runBefore).toEqual(['convertToJsonProcessor']);
});
it('should run after the correct processor', () => {