Skip to content

Cleaned up markdown.rs #1345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions pgml-dashboard/src/utils/markdown.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::api::cms::{DocType, Document};
use crate::{templates::docs::TocLink, utils::config};
use anyhow::Context;
use comrak::{format_html_with_plugins, parse_document, ComrakPlugins};
use std::cell::RefCell;
use std::collections::HashMap;
use std::path::PathBuf;
Expand All @@ -17,7 +16,6 @@ use comrak::{
use convert_case;
use itertools::Itertools;
use regex::Regex;
use serde::Deserialize;
use std::fmt;
use std::sync::Mutex;
use url::Url;
Expand Down Expand Up @@ -1221,13 +1219,6 @@ pub async fn get_document(path: &PathBuf) -> anyhow::Result<String> {
Ok(tokio::fs::read_to_string(path).await?)
}

#[derive(Deserialize)]
struct SearchResultWithoutSnippet {
title: String,
contents: String,
path: String,
}

pub struct SearchResult {
pub title: String,
pub path: String,
Expand Down