export { formatComment };
export default function formatComment(comment) {
    if (!comment) {
        return undefined;
    }
    const parts = comment.trim().split('\n');
    if (parts.length === 1 && parts[0].indexOf('*') !== 0) {
        return parts[0];
    }
    return parts.reduce((previousValue, currentValue) => {
        let delimiter = '';
        if (previousValue !== '') {
            delimiter = '\\n';
        }
        return previousValue.concat(delimiter, currentValue.trim().replace(/[*]*\s*/, ''));
    }, '');
}
