From 34151e8da8e1863b7954d87c1713b97f3a944545 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sun, 13 Sep 2020 23:20:26 +0200 Subject: HTML writer: support intermediate table headers Closes: #6314 --- test/Tests/Old.hs | 2 +- test/tables/students.html4 | 55 +++++++++++++++++++++++++++++++++++++++++++++ test/tables/students.html5 | 55 +++++++++++++++++++++++++++++++++++++++++++++ test/tables/students.native | 37 ++++++++++++++++++++++++++++++ 4 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 test/tables/students.html4 create mode 100644 test/tables/students.html5 create mode 100644 test/tables/students.native (limited to 'test') diff --git a/test/Tests/Old.hs b/test/Tests/Old.hs index fc5721edb..d1d27d9a5 100644 --- a/test/Tests/Old.hs +++ b/test/Tests/Old.hs @@ -272,7 +272,7 @@ extendedWriterTests pandocPath format opts ("tables" name <.> "native") ("tables" name <.> format) - in map testForTable ["planets", "nordics"] + in map testForTable ["planets", "nordics", "students"] where opts = ["-r", "native", "-w", format, "--columns=78", "--variable", "pandoc-version="] diff --git a/test/tables/students.html4 b/test/tables/students.html4 new file mode 100644 index 000000000..b02b0aba8 --- /dev/null +++ b/test/tables/students.html4 @@ -0,0 +1,55 @@ + + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

List of Students

Student IDName
Computer Science
3741255Jones, Martha
4077830Pierce, Benjamin
5151701Kirk, James
Russian Literature
3971244Nim, Victor
Astrophysics
4100332Petrov, Alexandra
4100332Toyota, Hiroko
diff --git a/test/tables/students.html5 b/test/tables/students.html5 new file mode 100644 index 000000000..af9e088fb --- /dev/null +++ b/test/tables/students.html5 @@ -0,0 +1,55 @@ + + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

List of Students

Student IDName
Computer Science
3741255Jones, Martha
4077830Pierce, Benjamin
5151701Kirk, James
Russian Literature
3971244Nim, Victor
Astrophysics
4100332Petrov, Alexandra
4100332Toyota, Hiroko
diff --git a/test/tables/students.native b/test/tables/students.native new file mode 100644 index 000000000..13122ede2 --- /dev/null +++ b/test/tables/students.native @@ -0,0 +1,37 @@ +[Table ("students",[],[("source","mdn")]) (Caption Nothing + [Para [Str "List", Space, Str "of", Space, Str "Students"]]) + [(AlignLeft,ColWidth 0.5) + ,(AlignLeft,ColWidth 0.5)] + (TableHead ("",[],[]) + [Row ("",[],[]) + [Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1) [Plain [Str "Student", Space, Str "ID"]] + ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1) [Plain [Str "Name"]]]]) + [TableBody ("",["souvereign-states"],[]) (RowHeadColumns 0) + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 2) [Plain [Str "Computer", Space, Str "Science"]]]] + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "3741255"]] + ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Jones,", Space, Str "Martha"]]] + ,Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "4077830"]] + ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Pierce,", Space, Str "Benjamin"]]] + ,Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "5151701"]] + ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Kirk,", Space, Str "James"]]]] + ,TableBody ("",[],[]) (RowHeadColumns 0) + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 2) [Plain [Str "Russian", Space, Str "Literature"]]]] + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "3971244"]] + ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Nim,", Space, Str "Victor"]]]] + ,TableBody ("",[],[]) (RowHeadColumns 0) + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 2) [Plain [Str "Astrophysics"]]]] + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "4100332"]] + ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Petrov,", Space, Str "Alexandra"]]] + ,Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "4100332"]] + ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Toyota,", Space, Str "Hiroko"]]]]] + (TableFoot ("",[],[]) []) +] -- cgit v1.2.3