Skip to content

Commit

Permalink
Merge pull request #157 from rwjblue/update-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Oct 15, 2021
2 parents 59ec228 + 5077d4a commit a8df386
Show file tree
Hide file tree
Showing 3 changed files with 1,238 additions and 711 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -8,7 +8,7 @@ import { Plugin } from 'release-it';
import { format } from 'release-it/lib/util.js';
import tmp from 'tmp';
import execa from 'execa';
import parse from 'mdast-util-from-markdown';
import { fromMarkdown } from 'mdast-util-from-markdown';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand Down Expand Up @@ -187,7 +187,7 @@ export default class LernaChangelogGeneratorPlugin extends Plugin {
}

_findInsertOffset(oldContent) {
let ast = parse(oldContent);
let ast = fromMarkdown(oldContent);
let firstH2 = ast.children.find((it) => it.type === 'heading' && it.depth === 2);
return firstH2 ? firstH2.position.start.offset : 0;
}
Expand Down

0 comments on commit a8df386

Please sign in to comment.