Do not allow plain links without a path.

This commit is contained in:
Tom Alexander
2023-08-29 15:44:04 -04:00
parent f592b73ae7
commit 56865c68fc
3 changed files with 100 additions and 34 deletions

View File

@@ -15,7 +15,8 @@ use crate::error::Res;
use crate::parser::object::Entity;
use crate::parser::util::get_consumed;
const ENTITIES: [&'static str; 413] = [
// TODO: Make this a user-provided variable corresponding to elisp's org-entities
const ORG_ENTITIES: [&'static str; 413] = [
"Agrave",
"agrave",
"Aacute",
@@ -457,8 +458,7 @@ fn name<'r, 's>(
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
// TODO: This should be defined by org-entities and optionally org-entities-user
for entity in ENTITIES {
// foo
for entity in ORG_ENTITIES {
let result = tag_no_case::<_, _, CustomError<_>>(entity)(input);
match result {
Ok((remaining, ent)) => {