lib/cmsTxtToIntObj.js
function getMetaBody(sectionString) {
    var sectionBody = {};
    var sectionBodyObj = {};
    var metaBodyCode = /-{2,}((\n*?\*{3,}[\S\s]+\*{3,})|(\n{2,}))[\S\s]+?\n{3,}/gi;
    var objectStrings = sectionString.match(metaBodyCode);
    for (var obj = 0; obj < objectStrings.length; obj++) {
        var sectionChild = processMetaChild(objectStrings[obj]);
        if (!isEmpty(sectionChild)) {
            sectionBodyObj.type = 'cms';
            //get only the number from version
            var versionRegExp = /\(v[\S\s]+?\)/;
            var version = sectionChild[0].match(versionRegExp)[0];
            version = trimStringEnds(version, ['(', ')', 'v']);
            sectionBodyObj.version = version;
            sectionBodyObj.timestamp = sectionChild[1];
        }
    }
    sectionBody.data = [sectionBodyObj];
    return sectionBody;

}
function getMetaBody(sectionString) {
    var sectionBody = {};
    var sectionBodyObj = {};
    var metaBodyCode = /-{2,}((\n*?\*{3,}[\S\s]+\*{3,})|(\n{2,}))[\S\s]+?\n{3,}/gi;
    var objectStrings = sectionString.match(metaBodyCode);
    for (var obj = 0; obj < objectStrings.length; obj++) {
        var sectionChild = processMetaChild(objectStrings[obj]);
        if (!isEmpty(sectionChild)) {
            sectionBodyObj.type = 'cms';
            //get only the number from version
            var versionRegExp = /\(v[\S\s]+?\)/;
            var version = sectionChild[0].match(versionRegExp)[0];
            version = trimStringEnds(version, ['(', ')', 'v']);
            sectionBodyObj.version = version;
            sectionBodyObj.timestamp = sectionChild[1];
        }
    }
    sectionBody.data = [sectionBodyObj];
    return sectionBody;

}
function getMetaBody ( sectionString ) { var sectionBody = { } ; var sectionBodyObj = { } ; var metaBodyCode = / -{2,}((\n*?\*{3,}[\S\s]+\*{3,})|(\n{2,}))[\S\s]+?\n{3,} / gi ; var objectStrings = sectionString . match ( metaBodyCode ) ; for ( var obj = 0 ; obj < objectStrings . length ; obj ++ ) { var sectionChild = processMetaChild ( objectStrings [ obj ] ) ; if ( ! isEmpty ( sectionChild ) ) { sectionBodyObj . type = 'cms' ; //get only the number from version var versionRegExp = / \(v[\S\s]+?\) / ; var version = sectionChild [ 0 ] . match ( versionRegExp ) [ 0 ] ; version = trimStringEnds ( version , [ '(' , ')' , 'v' ] ) ; sectionBodyObj . version = version ; sectionBodyObj . timestamp = sectionChild [ 1 ] ; } } sectionBody . data = [ sectionBodyObj ] ; return sectionBody ; }
functions for specific meta characters
functions for specific meta characters