Skip to main content

render_sync

Function render_sync 

Source
pub fn render_sync(
    file: PathBuf,
    root_path: &Path,
    oembed_timeout_ms: u64,
    link_transform_config: LinkTransformConfig,
    oembed_cache: Option<Arc<OembedCache>>,
    server_mode: bool,
    transcode_enabled: bool,
    valid_tag_sources: HashSet<String>,
    review: ReviewLines,
    mark_incomplete: bool,
    incomplete_markers: &[String],
    wikilink_index: Option<Arc<WikilinkIndex>>,
) -> Result<MarkdownRenderResult, MarkdownError>
Expand description

Synchronous counterpart of render_with_cache for use from rayon threads: reads file and renders it with render_str.

No-network embeds (Giphy, GitHub gist, and bare-URL media) ARE produced in the sync path — they are pure CPU (regex/string) and require no I/O, so they work in build mode regardless of oembed_timeout_ms. Only OpenGraph network fetches are skipped here; when oembed_timeout_ms > 0 and a cache is present, previously cached network results are also merged in (but never fetched fresh).