Skip to content
Merged
Show file tree
Hide file tree
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 src/FSharp.Formatting.Markdown/HtmlFormatting.fs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ let internal htmlEncode (code: string) =
let internal htmlEncodeQuotes (code: string) =
(htmlEncode code).Replace("\"", """)

/// Lookup a specified key in a dictionary, possibly
/// ignoring newlines or spaces in the key.
let internal (|LookupKey|_|) (dict: IDictionary<_, _>) (key: string) =
[ key; key.Replace("\r\n", ""); key.Replace("\r\n", " "); key.Replace("\n", ""); key.Replace("\n", " ") ]
|> List.tryPick (fun key ->
match dict.TryGetValue(key) with
| true, v -> Some v
| _ -> None)

/// Generates a unique string out of given input
type internal UniqueNameGenerator() =
let generated = new System.Collections.Generic.Dictionary<string, int>()
Expand Down
9 changes: 0 additions & 9 deletions src/FSharp.Formatting.Markdown/LatexFormatting.fs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ let latexEncode s =
specialChars
|> Array.fold (fun (acc: string) (k, v) -> acc.Replace(k, v)) (System.Net.WebUtility.HtmlDecode s)

/// Lookup a specified key in a dictionary, possibly
/// ignoring newlines or spaces in the key.
let (|LookupKey|_|) (dict: IDictionary<_, _>) (key: string) =
[ key; key.Replace("\r\n", ""); key.Replace("\r\n", " "); key.Replace("\n", ""); key.Replace("\n", " ") ]
|> List.tryPick (fun key ->
match dict.TryGetValue(key) with
| true, v -> Some v
| _ -> None)

/// Context passed around while formatting the LaTEX
type FormattingContext =
{ LineBreak: unit -> unit
Expand Down
Loading