Initial rework of parser.
This commit is contained in:
parent
34e8ae9d29
commit
c3613fab29
1 changed files with 13 additions and 0 deletions
|
|
@ -8,10 +8,23 @@ export const ScriptureLinks = () => {
|
||||||
let passage = '';
|
let passage = '';
|
||||||
let isQuote = false;
|
let isQuote = false;
|
||||||
let isCite = false;
|
let isCite = false;
|
||||||
|
let tag = '';
|
||||||
const url = node.properties.href;
|
const url = node.properties.href;
|
||||||
if (node.tagName !== 'a') {
|
if (node.tagName !== 'a') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!url.startsWith(':')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (url.indexOf('=') != -1) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
tag = url.substring(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!url.startsWith(':scripture')) {
|
if (!url.startsWith(':scripture')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue