/**
 * @license Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */

'use strict';

const insertChangelog = require( '../../utils/insertchangelog' );

/**
 * Replaces the `{@changelog X.Y.Z}` expression with the changelog entries for the specified version.
 * The version must follow the semantic versioning specification.
 *
 * Returned changes will be parsed by Hexo when building the documentation.
 */
hexo.extend.filter.register( 'before_post_render', page => {
	return insertChangelog( page, hexo );
} );
