You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's a tricky one.
I thought about assuming html input if --base was a valid URL, but Markdown files can also contain relative links and be prefixed with a URL. So that alone is not a decision criteria.
lychee has an internal file-type hint, that we could expose on the CLI, even though it sounds like a workaround.
/// Lychee Input with optional file hint for parsing
#[derive(Clone,Debug,PartialEq,Eq,Hash)]
pubstructInput{
/// Origin of input
pubsource:InputSource,
/// Hint to indicate which extractor to use
pubfile_type_hint:Option<FileType>,
/// Excluded paths that will be skipped when reading content
pubexcluded_paths:Option<Vec<PathBuf>>,
}
I'm open for suggestions on how to make the file type explicit in an ergonomic way. Alternatively maybe I'm overlooking a possibility to make it work without any file type hints.
This is an attempt to address lycheeverse#671 by adding a flag `--html` to parse
the input as HTML. Otherwise, STDIN and local files without the `.html`
suffix are parsed as plain text.
A similar issue was reported in #183 and addressed by #217. However, this doesn't work when files are passed into
STDIN
, or for local files.Could this be fixed by having
--base
force HTML mode?The text was updated successfully, but these errors were encountered: