Compare commits

...

4 Commits

Author SHA1 Message Date
Shan Carter c8fa1f7eaa 0.0.11 2017-01-09 17:14:26 -08:00
Shan Carter 05179d887e Fix 2017-01-09 17:14:24 -08:00
Shan Carter c02748434c 0.0.10 2017-01-09 17:09:59 -08:00
Shan Carter bed9a09325 testing 2017-01-09 17:09:54 -08:00
5 changed files with 19 additions and 8 deletions
+1
View File
@@ -8,6 +8,7 @@ export default function(dom, data) {
if (el) {
let rawBib = el.textContent;
let parsed = bibtexParse.toJSON(rawBib);
console.log(parsed);
if(parsed) {
parsed.forEach(e => {
bibliography[e.citationKey] = e.entryTags;
+7 -3
View File
@@ -80,13 +80,17 @@ export default function(dom, data) {
});
if (data.citations) {
data.citations.forEach(key =>
data.citations.forEach(key => {
let d = data.bibliography[key];
if(!d) {
console.warn("No bibliography data fround for " + key)
} else {
meta("citation_reference", citation_meta_content(data.bibliography[key]) )
);
};
});
}
}
function appendHtml(el, html) {
el.innerHTML += html;
}
+9 -3
View File
@@ -4194,6 +4194,7 @@ var bibliography = function(dom, data) {
if (el) {
var rawBib = el.textContent;
var parsed = bibtexParse.toJSON(rawBib);
console.log(parsed);
if(parsed) {
parsed.forEach(function (e) {
bibliography[e.citationKey] = e.entryTags;
@@ -4310,12 +4311,17 @@ var meta = function(dom, data) {
});
if (data.citations) {
data.citations.forEach(function (key) { return meta("citation_reference", citation_meta_content(data.bibliography[key]) ); }
);
data.citations.forEach(function (key) {
var d = data.bibliography[key];
if(!d) {
console.warn("No bibliography data fround for " + key);
} else {
meta("citation_reference", citation_meta_content(data.bibliography[key]) );
}
});
}
};
function appendHtml(el, html) {
el.innerHTML += html;
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "distill-template",
"version": "0.0.9",
"version": "0.0.11",
"description": "Template for creating Distill articles.",
"main": "dist/template.js",
"scripts": {