Struct libimagentrymarkdown::processor::LinkProcessor [] [src]

pub struct LinkProcessor { /* fields omitted */ }

A link Processor which collects the links from a Markdown and passes them on to libimagentrylink functionality

The processor can be configured to

  • Process internal links (from store entry to store entry)
  • Process internal links with automatically creating targets If an internal link is encountered, the corrosponding target must be present in the store. If it is not, it will either be created or the processing fails
  • Process external links (from store entry to URL)
  • Process refs (from store entry to files on the filesystem and outside of the store) (default: false)

Note

There's no LinkProcessor::new() function, please use LinkProcessor::default().

Methods

impl LinkProcessor
[src]

Switch internal link processing on/off

Internal links are links which are simply dirctory/file, but not /directory/file, as beginning an id with / is discouraged in imag.

[src]

Switch internal link target creation on/off

If a link points to a non-existing imag entry, a false here will cause the processor to return an error from process(). A true setting will create the entry and then fetch it to link it to the processed entry.

Switch external link processing on/off

An external link must start with https:// or http://.

[src]

Switch ref processing on/off

A Ref is to be expected beeing a link with file::/// at the beginning.

[src]

Process an Entry for its links

Warning

When LinkProcessor::create_internal_targets() was called to set the setting to true, this function returns all errors returned by the Store.

Trait Implementations

impl Default for LinkProcessor
[src]

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for LinkProcessor

impl Sync for LinkProcessor