aboutsummaryrefslogtreecommitdiffstats
path: root/FMark
diff options
context:
space:
mode:
authorGeorge Punter <gsp14@ic.ac.uk>2018-03-22 20:09:13 +0000
committerGeorge Punter <gsp14@ic.ac.uk>2018-03-22 20:09:13 +0000
commit09cdeb8f0e030d0ac7e8ce0900d9111dee917dc9 (patch)
tree3ea59ac63dcaa25735bb13edfaae32f2b7fe0495 /FMark
parentab227ecdb6252aa36b33aedc7a525e4c52339755 (diff)
downloadFMark-09cdeb8f0e030d0ac7e8ce0900d9111dee917dc9.tar.gz
FMark-09cdeb8f0e030d0ac7e8ce0900d9111dee917dc9.zip
renaming Cite->InlineCitation, Foot->InlineFootnote
Diffstat (limited to 'FMark')
-rw-r--r--FMark/src/Common/HTMLGen/HTMLGen.fs4
-rw-r--r--FMark/src/Common/HTMLGen/HTMLGenTester.fs4
-rw-r--r--FMark/src/Common/Parser/ParserHelperFuncs.fs4
-rw-r--r--FMark/src/Common/Parser/ParserTest.fs12
-rw-r--r--FMark/src/Common/TOCite/TOCiteTest.fs2
-rw-r--r--FMark/src/Common/Types.fs2
6 files changed, 14 insertions, 14 deletions
diff --git a/FMark/src/Common/HTMLGen/HTMLGen.fs b/FMark/src/Common/HTMLGen/HTMLGen.fs
index 3808fc0..9b10874 100644
--- a/FMark/src/Common/HTMLGen/HTMLGen.fs
+++ b/FMark/src/Common/HTMLGen/HTMLGen.fs
@@ -31,9 +31,9 @@ and strInlineElements eles =
| Picture (alt, url) ->
let attrs = [("src", url); ("alt", alt)]
attachHTMLTag ("img", attrs, false) ""
- | Cite (ht, id) -> // style for inline referencing the footnotes and citations in the end
+ | InlineCitation (ht, id) -> // style for inline referencing the footnotes and citations in the end
refPrint false (ht,id)
- | Foot (hr, id) -> refPrint true (ht,id)
+ | InlineFootnote (hr, id) -> refPrint true (ht,id)
List.fold convertHtml "" eles
/// process Markdown paragraph
diff --git a/FMark/src/Common/HTMLGen/HTMLGenTester.fs b/FMark/src/Common/HTMLGen/HTMLGenTester.fs
index ca661ba..7dff02e 100644
--- a/FMark/src/Common/HTMLGen/HTMLGenTester.fs
+++ b/FMark/src/Common/HTMLGen/HTMLGenTester.fs
@@ -303,8 +303,8 @@ let reallyBigTest =
("big HTML test",
[Paragraph [[FrmtedString (Literal "text1#text2")]];
Header ({HeaderName = [FrmtedString (Literal "Header1")]; Level = 1;},"Header10");
- Paragraph [[Foot (Literal "Footer1","footnote-1"); FrmtedString (Literal "text4")]];
- Paragraph [[Cite (Literal "(Wang, 2017)","footnote-Eric"); FrmtedString (Literal "text6")]];
+ Paragraph [[InlineFootnote (Literal "Footer1","footnote-1"); FrmtedString (Literal "text4")]];
+ Paragraph [[InlineCitation(Literal "(Wang, 2017)","footnote-Eric"); FrmtedString (Literal "text6")]];
Footnote (1,[FrmtedString (Literal "footer1")]);
Citation (
"footnote-Eric",Literal "(Wang, 2017)",
diff --git a/FMark/src/Common/Parser/ParserHelperFuncs.fs b/FMark/src/Common/Parser/ParserHelperFuncs.fs
index a2894cb..997af6d 100644
--- a/FMark/src/Common/Parser/ParserHelperFuncs.fs
+++ b/FMark/src/Common/Parser/ParserHelperFuncs.fs
@@ -457,14 +457,14 @@ let parseInLineElements2 refLst toks =
let idStr = string i
match findFN i ftLst with
| Ok _ -> // ok if found at least one reference in refLst
- [(Literal idStr, idStr) |> Foot]@currentLine, rtks
+ [(Literal idStr, idStr) |> InlineFootnote]@currentLine, rtks
| Error msg -> // error if no reference is found in refLst
[msg |> Literal |> FrmtedString], rtks
| CITATION str :: rtks ->
match findCite str ftLst with
| Ok ref -> // ok if found at least one reference in refLst
match ref with
- | Citation (id, hyperText, _) -> [(hyperText, id) |> Cite]@currentLine, rtks
+ | Citation (id, hyperText, _) -> [(hyperText, id) |> InlineCitation]@currentLine, rtks
| _ -> failwith "non-citation in citation list"
| Error msg -> // error if no reference is found in refLst
[msg |> Literal |> FrmtedString], rtks
diff --git a/FMark/src/Common/Parser/ParserTest.fs b/FMark/src/Common/Parser/ParserTest.fs
index 60563e2..8902629 100644
--- a/FMark/src/Common/Parser/ParserTest.fs
+++ b/FMark/src/Common/Parser/ParserTest.fs
@@ -333,21 +333,21 @@ let ``reference tests`` =
refStyleToks
@[LSBRA; CARET; NUMBER "1"; RSBRA]
@refToks,
- [Paragraph [[Foot (Literal "1","1")]]]@refPobjs,
+ [Paragraph [[InlineFootnote(Literal "1","1")]]]@refPobjs,
"just 1 footnote"
);
(
refStyleToks
@[LSBRA; CARET; LITERAL "Eric"; RSBRA]
@refToks,
- [Paragraph [[Cite (Literal "(Wang, 2017)","Eric")]]]@refPobjs,
+ [Paragraph [[InlineCitation(Literal "(Wang, 2017)","Eric")]]]@refPobjs,
"just 1 citation"
);
(
refStyleToks
@[LITERAL "text3"; LSBRA; CARET; NUMBER "1"; RSBRA; LITERAL "text4"]
@refToks,
- [Paragraph [[FrmtedString (Literal "text3");Foot (Literal "1","1"); FrmtedString (Literal "text4")]]]@refPobjs,
+ [Paragraph [[FrmtedString (Literal "text3");InlineFootnote(Literal "1","1"); FrmtedString (Literal "text4")]]]@refPobjs,
"Literal and 1 footnote"
);
@@ -355,7 +355,7 @@ let ``reference tests`` =
refStyleToks
@[LITERAL "text5"; LSBRA; CARET; LITERAL "Eric"; RSBRA; LITERAL "text6"]
@refToks,
- [Paragraph [[FrmtedString (Literal "text5");Cite (Literal "(Wang, 2017)","Eric"); FrmtedString (Literal "text6")]]]@refPobjs,
+ [Paragraph [[FrmtedString (Literal "text5");InlineCitation(Literal "(Wang, 2017)","Eric"); FrmtedString (Literal "text6")]]]@refPobjs,
"Literal and 1 citation"
);
(
@@ -364,8 +364,8 @@ let ``reference tests`` =
@[LITERAL "text5"; LSBRA; CARET; LITERAL "Eric"; RSBRA; LITERAL "text6"]
@refToks,
[Paragraph [
- [FrmtedString (Literal "text3");Foot (Literal "1","1"); FrmtedString (Literal "text4")];
- [FrmtedString (Literal "text5");Cite (Literal "(Wang, 2017)","Eric"); FrmtedString (Literal "text6")]
+ [FrmtedString (Literal "text3");InlineFootnote(Literal "1","1"); FrmtedString (Literal "text4")];
+ [FrmtedString (Literal "text5");InlineCitation(Literal "(Wang, 2017)","Eric"); FrmtedString (Literal "text6")]
]]@refPobjs,
"multiline, 1 footnote, 1 citation"
);
diff --git a/FMark/src/Common/TOCite/TOCiteTest.fs b/FMark/src/Common/TOCite/TOCiteTest.fs
index 5665d5a..cf0a6c3 100644
--- a/FMark/src/Common/TOCite/TOCiteTest.fs
+++ b/FMark/src/Common/TOCite/TOCiteTest.fs
@@ -87,7 +87,7 @@ let testDataHd = [
[ENDLINE;ENDLINE; HASH; WHITESPACE 1; LITERAL "text1"; FOOTNOTE 3; LITERAL "text2"],
(
[{HeaderName = [FrmtedString (Literal "text1");
- Foot (Literal "3","footnote-3");
+ InlineFootnote(Literal "3","footnote-3");
FrmtedString (Literal "text2");
]; Level = 1;}],
[ENDLINE;ENDLINE;HEADER 0]
diff --git a/FMark/src/Common/Types.fs b/FMark/src/Common/Types.fs
index b5e14a4..b26b372 100644
--- a/FMark/src/Common/Types.fs
+++ b/FMark/src/Common/Types.fs
@@ -29,7 +29,7 @@ and InlineElement =
| FrmtedString of TFrmtedString
| Link of HyperText: TFrmtedString * URL: string
| Picture of Alt: string * URL: string
- | Cite of HyperText: TFrmtedString * ID: string
+ | InlineCitationof HyperText: TFrmtedString * ID: string
| Foot of HyperText: TFrmtedString * ID: string
type TLine = InlineElement list