diff --git a/main.go b/main.go index ccfd9a7..8322c19 100644 --- a/main.go +++ b/main.go @@ -35,8 +35,6 @@ var ( inlineCodePattern = regexp.MustCompile("`([^`]+)`") codeBlockPattern = regexp.MustCompile("(?s)```(.*?)```") blockquotePattern = regexp.MustCompile(`(?m)^> (.+)$`) - ulPattern = regexp.MustCompile(`(?m)^(?:- |\*) (.+)$`) - olPattern = regexp.MustCompile(`(?m)^\d+\. (.+)$`) linkPattern = regexp.MustCompile(`\[(.*?)\]\((.*?)\)`) ) @@ -104,17 +102,9 @@ func renderMarkdown(content string) template.HTML { content = blockquotePattern.ReplaceAllString(content, "
$1") content = linkPattern.ReplaceAllString(content, `$1`) - // Handle lists properly - //content = ulPattern.ReplaceAllString(content, "
$1
") + content = paragraphPattern.ReplaceAllString(content, "$1") return template.HTML(content) } diff --git a/templates/post.html b/templates/post.html index 38d0d8d..6657c80 100644 --- a/templates/post.html +++ b/templates/post.html @@ -9,6 +9,10 @@ margin: 25px; } + pre { + font-family: inherit; + } + img { vertical-align: middle; }