Skip to content

Commit

Permalink
Use new intro delimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
markelog committed Jun 4, 2016
1 parent 52311ac commit a884683
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/lib/collectData.jsx
Expand Up @@ -107,15 +107,17 @@ function getAvailableRules() {

function getReadmeData() {
return vowFs.read(jscsRoot + '/README.md', 'utf8').then((readme) => {
var introEnd = readme.indexOf('####');
var introEnd = readme.indexOf('<!-- intro-end -->');
var intro = readme.substr(0, introEnd);
var info = readme.substr(introEnd);

var badges = [];

intro = intro.replace(/\[\!\[([^\]]+)\]\(([^\)]+)\)\]\(([^\)]+)\)/g, function(s, title, imageUrl, url) {
badges.push(new BadgeModel({title, imageUrl, url}));
return '';
}).trim();

var introBits = intro.split('\n');
var title = processMarkdown(introBits.shift());
var introduction = processMarkdown(introBits.join('\n'));
Expand Down

0 comments on commit a884683

Please sign in to comment.