From 1de595a4a9c5536d32d597dba799cd036582af0f Mon Sep 17 00:00:00 2001 From: Isaac Muse Date: Thu, 4 Jan 2018 13:07:45 -0700 Subject: Fix raw html reference issue (#585) Preserve the line which a reference was on to prevent raw HTML indexing issue. Fixes #584. Prevent raw HTML parsing issue in abbr and footnotes Peserve abbreviation line when stripping and preserve a line for each footnote block. Footnotes should also accumulate the extraneous padding. Test extra lines at the end of references Strip the gathered extraneous whitespace When processing footnotes, we don't actually care to process the extra whitespace at the end of a footnote, but we want it to calculate lines to preserve. --- tests/extensions/extra/raw-html.html | 75 +++++++++++++++++++++++ tests/extensions/extra/raw-html.txt | 111 +++++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+) (limited to 'tests/extensions/extra') diff --git a/tests/extensions/extra/raw-html.html b/tests/extensions/extra/raw-html.html index 9c0222f..717bd73 100644 --- a/tests/extensions/extra/raw-html.html +++ b/tests/extensions/extra/raw-html.html @@ -46,4 +46,79 @@ Raw html blocks may also be nested.

foo bar

bar

+ +
+
+

link

+
+
+
+
+

abbr

+
+
+
+
+

footnote1

+
+
+
+
+

link

+
+
+
+
+

abbr

+
+
+
+
+

footnote2

+
+
+
+
+
    +
  1. +
      +
    1. +

      The top couple half figure, contrary sides and hands across with bottom couple,

      +

      Half figure back on your own sides, and turn partner to places,

      +

      Swing partners with right hands into straight line long-ways, as in a reel, and

      +

      Set,

      +

      Hey and return to places,

      +

      The other three couples do the same.

      +
    2. +
    3. +

      Top and bottom couples meet and set,

      +

      Then each gentleman leas the opposite lady to the couple on his left, and set,

      +

      Aach four right and left,

      +

      Swing side couples to places, and turn partners all eight,

      +

      The other two couple o the same.

      +
    4. +
    +

    +
  2. +
  3. +
      +
    1. +

      The top couple half figure, contrary sides and hands across with bottom couple,

      +

      Half figure back on your own sides, and turn partner to places,

      +

      Swing partners with right hands into straight line long-ways, as in a reel, and

      +

      Set,

      +

      Hey and return to places,

      +

      The other three couples do the same.

      +
    2. +
    3. +

      Top and bottom couples meet and set,

      +

      Then each gentleman leas the opposite lady to the couple on his left, and set,

      +

      Aach four right and left,

      +

      Swing side couples to places, and turn partners all eight,

      +

      The other two couple o the same.

      +
    4. +
    +

    +
  4. +
\ No newline at end of file diff --git a/tests/extensions/extra/raw-html.txt b/tests/extensions/extra/raw-html.txt index da24af0..c82ddbb 100644 --- a/tests/extensions/extra/raw-html.txt +++ b/tests/extensions/extra/raw-html.txt @@ -71,3 +71,114 @@ foo bar bar + +
+ +[link]: http://example.com + +
+[link][link] +
+ +
+ +
+ +*[abbr]: Abbreviation + +
+abbr +
+ +
+ +
+ +[^1]: + 1. The top couple half figure, contrary sides and hands across with bottom couple, + + Half figure back on your own sides, and turn partner to places, + + Swing partners with right hands into straight line long-ways, as in a reel, and + + Set, + + Hey and return to places, + + The other three couples do the same. + + 2. Top and bottom couples meet and set, + + Then each gentleman leas the opposite lady to the couple on his left, and set, + + Aach four right and left, + + Swing side couples to places, and turn partners all eight, + + The other two couple o the same. + +
+footnote[^1] +
+ +
+ +
+ +[link]: http://example.com + + + + +
+[link][link] +
+ +
+ +
+ +*[abbr]: Abbreviation + + + + +
+abbr +
+ +
+ +
+ +[^2]: + 1. The top couple half figure, contrary sides and hands across with bottom couple, + + Half figure back on your own sides, and turn partner to places, + + Swing partners with right hands into straight line long-ways, as in a reel, and + + Set, + + Hey and return to places, + + The other three couples do the same. + + 2. Top and bottom couples meet and set, + + Then each gentleman leas the opposite lady to the couple on his left, and set, + + Aach four right and left, + + Swing side couples to places, and turn partners all eight, + + The other two couple o the same. + + + + +
+footnote[^2] +
+ +
-- cgit v1.2.3