Starting rehype rework.
This commit is contained in:
parent
9494171ae7
commit
4324ad3443
1 changed files with 17 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ export const ScriptureLinks = () => {
|
||||||
let isQuote = false;
|
let isQuote = false;
|
||||||
let isCite = false;
|
let isCite = false;
|
||||||
let tag = '';
|
let tag = '';
|
||||||
|
let rest = '';
|
||||||
const url = node.properties.href;
|
const url = node.properties.href;
|
||||||
if (node.tagName !== 'a') {
|
if (node.tagName !== 'a') {
|
||||||
return;
|
return;
|
||||||
|
|
@ -17,12 +18,26 @@ export const ScriptureLinks = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (url.indexOf('=') != -1) {
|
if (url.indexOf('=') != -1) {
|
||||||
|
tag = url.substring(0, url.indexOf('='));
|
||||||
|
rest = url.substring(url.indexOf('='));
|
||||||
} else {
|
} else {
|
||||||
tag = url.substring(1);
|
tag = url.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (tag) {
|
||||||
|
// Scripture reference.
|
||||||
|
case 'scripture':
|
||||||
|
break;
|
||||||
|
// Quoting Jesus' words.
|
||||||
|
case 'jesus':
|
||||||
|
break;
|
||||||
|
// Bible quote.
|
||||||
|
case 'quote':
|
||||||
|
break;
|
||||||
|
// Source citation.
|
||||||
|
case 'cite':
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!url.startsWith(':scripture')) {
|
if (!url.startsWith(':scripture')) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue