mirror of
https://github.com/sbrow/thor.git
synced 2026-08-26 11:23:32 -04:00
style: Ran odinfmt.
This commit is contained in:
@@ -95,4 +95,3 @@ transform_alert :: proc(sb: ^strings.Builder, bq: string) {
|
||||
strings.write_string(sb, " ")
|
||||
strings.write_string(sb, rest)
|
||||
}
|
||||
|
||||
|
||||
@@ -101,4 +101,3 @@ test_multiple_alerts_render_together :: proc(t: ^testing.T) {
|
||||
</blockquote>`,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -434,4 +434,3 @@ expand_emoji :: proc(text: string) -> string {
|
||||
|
||||
return strings.to_string(sb)
|
||||
}
|
||||
|
||||
|
||||
@@ -30,4 +30,3 @@ test_emoji_skips_invalid_shortcodes :: proc(t: ^testing.T) {
|
||||
testing.expect_value(t, expand_emoji(":Smile:"), ":Smile:")
|
||||
testing.expect_value(t, expand_emoji(": not real :"), ": not real :")
|
||||
}
|
||||
|
||||
|
||||
@@ -210,4 +210,3 @@ strip_p_tags :: proc(html: string) -> string {
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
|
||||
@@ -119,4 +119,3 @@ test_inject_notes_missing_ref :: proc(t: ^testing.T) {
|
||||
testing.expect(t, strings.contains(out, "[^missing]"))
|
||||
testing.expect(t, strings.contains(out, "[*missing]"))
|
||||
}
|
||||
|
||||
|
||||
@@ -193,4 +193,3 @@ make_unique :: proc(slug: string, seen: ^map[string]bool) -> string {
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,11 @@ test_heading_simple :: proc(t: ^testing.T) {
|
||||
@(test)
|
||||
test_heading_dedup :: proc(t: ^testing.T) {
|
||||
result := inject_heading_ids("<h2>Intro</h2><p>text</p><h2>Intro</h2>")
|
||||
testing.expect_value(t, result, `<h2 id="intro">Intro</h2><p>text</p><h2 id="intro-1">Intro</h2>`)
|
||||
testing.expect_value(
|
||||
t,
|
||||
result,
|
||||
`<h2 id="intro">Intro</h2><p>text</p><h2 id="intro-1">Intro</h2>`,
|
||||
)
|
||||
}
|
||||
|
||||
@(test)
|
||||
@@ -36,7 +40,9 @@ test_heading_punctuation :: proc(t: ^testing.T) {
|
||||
@(test)
|
||||
test_heading_all_levels :: proc(t: ^testing.T) {
|
||||
result := inject_heading_ids("<h1>A</h1><h2>B</h2><h3>C</h3><h4>D</h4><h5>E</h5><h6>F</h6>")
|
||||
testing.expect_value(t, result,
|
||||
testing.expect_value(
|
||||
t,
|
||||
result,
|
||||
`<h1 id="a">A</h1>` +
|
||||
`<h2 id="b">B</h2>` +
|
||||
`<h3 id="c">C</h3>` +
|
||||
@@ -88,9 +94,9 @@ test_heading_numbers :: proc(t: ^testing.T) {
|
||||
@(test)
|
||||
test_heading_triple_dedup :: proc(t: ^testing.T) {
|
||||
result := inject_heading_ids("<h2>Foo</h2><h2>Foo</h2><h2>Foo</h2>")
|
||||
testing.expect_value(t, result,
|
||||
`<h2 id="foo">Foo</h2>` +
|
||||
`<h2 id="foo-1">Foo</h2>` +
|
||||
`<h2 id="foo-2">Foo</h2>`,
|
||||
testing.expect_value(
|
||||
t,
|
||||
result,
|
||||
`<h2 id="foo">Foo</h2>` + `<h2 id="foo-1">Foo</h2>` + `<h2 id="foo-2">Foo</h2>`,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -305,4 +305,3 @@ highlight_code :: proc(html: string, file_path: string) -> string {
|
||||
}
|
||||
return strings.to_string(sb)
|
||||
}
|
||||
|
||||
|
||||
@@ -88,4 +88,3 @@ apply_extension_config :: proc(ext: ^bit_set[Extension], config: json.Object) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,4 +43,3 @@ wrap_sections :: proc(html: string) -> string {
|
||||
return html
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,4 +46,3 @@ test_wrap_sections_doesnt_split_content :: proc(t: ^testing.T) {
|
||||
"<section><h1>Big</h1><h3>Small</h3></section>",
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user