this repo has no description

Merge pull request #1254 from Julow/compat-5.3

Compatibility with OCaml 5.3

authored by

Jules Aguillon and committed by
GitHub
23747f84 822d2662

+15 -103
+1 -1
odoc-parser.opam
··· 14 14 doc: "https://ocaml.github.io/odoc/odoc_parser" 15 15 depends: [ 16 16 "dune" {>= "3.7"} 17 - "ocaml" {>= "4.02.0" & < "5.3"} 17 + "ocaml" {>= "4.02.0" & < "5.4"} 18 18 "astring" 19 19 "result" 20 20 "camlp-streams"
+1 -1
odoc.opam
··· 45 45 "cppo" {build & >= "1.1.0"} 46 46 "dune" {>= "3.7.0"} 47 47 "fpath" 48 - "ocaml" {>= "4.02.0" & < "5.3"} 48 + "ocaml" {>= "4.02.0" & < "5.4"} 49 49 "result" 50 50 "tyxml" {>= "4.4.0"} 51 51 "fmt"
+2 -1
src/syntax_highlighter/syntax_highlighter.ml
··· 154 154 155 155 let syntax_highlighting_locs src = 156 156 try 157 + Lexer.init (); 157 158 let lexbuf = Lexing.from_string 158 159 #if OCAML_VERSION >= (4,8,0) 159 160 ~with_positions:true ··· 175 176 collect lexbuf 176 177 with e -> 177 178 Format.eprintf "Error during syntax highlighting: %s\n%!" (Printexc.to_string e); 178 - [] 179 + []
+3 -7
test/generators/cases/alerts.mli
··· 17 17 (* At the top-level of a module. *) 18 18 19 19 module Top1 : sig 20 - [@@@deprecated "A"] 21 20 22 - (** Top-comment. *) 23 - end 24 - 25 - module Top2 : sig 26 - [@@@deprecated "A"] 27 - 21 + (* On OCaml 4.04 to 4.06, this top-comment is lost by the parser if there's 22 + no empty line before it. *) 28 23 (** Top-comment. *) 29 24 end 25 + [@@deprecated "A"] 30 26 31 27 (* Deprecated alert tag. *) 32 28
+2 -2
test/generators/html/Alerts-Top1.html
··· 12 12 <a href="Alerts.html">Alerts</a> &#x00BB; Top1 13 13 </nav> 14 14 <header class="odoc-preamble"> 15 - <h1>Module <code><span>Alerts.Top1</span></code></h1><p>Top-comment.</p> 15 + <h1>Module <code><span>Alerts.Top1</span></code></h1> 16 16 <ul class="at-tags"> 17 17 <li class="deprecated"><span class="at-tag">deprecated</span> A</li> 18 - </ul> 18 + </ul><p>Top-comment.</p> 19 19 </header><div class="odoc-content"></div> 20 20 </body> 21 21 </html>
-21
test/generators/html/Alerts-Top2.html
··· 1 - <!DOCTYPE html> 2 - <html xmlns="http://www.w3.org/1999/xhtml"> 3 - <head><title>Top2 (Alerts.Top2)</title><meta charset="utf-8"/> 4 - <link rel="stylesheet" href="odoc.css"/> 5 - <meta name="generator" content="odoc %%VERSION%%"/> 6 - <meta name="viewport" content="width=device-width,initial-scale=1.0"/> 7 - <script src="highlight.pack.js"></script> 8 - <script>hljs.initHighlightingOnLoad();</script> 9 - </head> 10 - <body class="odoc"> 11 - <nav class="odoc-nav"><a href="Alerts.html">Up</a> – 12 - <a href="Alerts.html">Alerts</a> &#x00BB; Top2 13 - </nav> 14 - <header class="odoc-preamble"> 15 - <h1>Module <code><span>Alerts.Top2</span></code></h1><p>Top-comment.</p> 16 - <ul class="at-tags"> 17 - <li class="deprecated"><span class="at-tag">deprecated</span> A</li> 18 - </ul> 19 - </header><div class="odoc-content"></div> 20 - </body> 21 - </html>
+1 -14
test/generators/html/Alerts.html
··· 57 57 <span class="keyword">end</span> 58 58 </span> 59 59 </code> 60 - </div><div class="spec-doc"><p>Top-comment.</p></div> 61 - </div> 62 - <div class="odoc-spec"> 63 - <div class="spec module anchored" id="module-Top2"> 64 - <a href="#module-Top2" class="anchor"></a> 65 - <code> 66 - <span><span class="keyword">module</span> 67 - <a href="Alerts-Top2.html">Top2</a> 68 - </span> 69 - <span> : <span class="keyword">sig</span> ... 70 - <span class="keyword">end</span> 71 - </span> 72 - </code> 73 - </div><div class="spec-doc"><p>Top-comment.</p></div> 60 + </div> 74 61 </div> 75 62 <div class="odoc-spec"> 76 63 <div class="spec value anchored" id="val-d">
-1
test/generators/html/alerts.targets
··· 1 1 Alerts.html 2 2 Alerts-Top1.html 3 - Alerts-Top2.html
+1 -5
test/generators/latex/Alerts.tex
··· 15 15 \end{ocamlindent}% 16 16 \medbreak 17 17 \label{Alerts-module-Top1}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Alerts-Top1]{\ocamlinlinecode{Top1}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\end{ocamlindent}% 18 - \ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Top-comment.\end{ocamlindent}% 19 - \medbreak 20 - \label{Alerts-module-Top2}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Alerts-Top2]{\ocamlinlinecode{Top2}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\end{ocamlindent}% 21 - \ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Top-comment.\end{ocamlindent}% 22 - \medbreak 18 + \ocamlcodefragment{\ocamltag{keyword}{end}}\\ 23 19 \label{Alerts-val-d}\ocamlcodefragment{\ocamltag{keyword}{val} d : int}\begin{ocamlindent}\begin{description}\kern-\topsep 24 20 \makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded 25 21 \item[{deprecated}]{A deprecated alert d}\end{description}%
+2 -14
test/generators/link.dune.inc
··· 708 708 (subdir 709 709 html 710 710 (rule 711 - (targets Alerts.html.gen Alerts-Top1.html.gen Alerts-Top2.html.gen) 711 + (targets Alerts.html.gen Alerts-Top1.html.gen) 712 712 (action 713 713 (run 714 714 odoc ··· 732 732 (alias runtest) 733 733 (action 734 734 (diff Alerts-Top1.html Alerts-Top1.html.gen)) 735 - (enabled_if 736 - (>= %{ocaml_version} 4.04))) 737 - (rule 738 - (alias runtest) 739 - (action 740 - (diff Alerts-Top2.html Alerts-Top2.html.gen)) 741 735 (enabled_if 742 736 (>= %{ocaml_version} 4.04)))) 743 737 ··· 791 785 (subdir 792 786 man 793 787 (rule 794 - (targets Alerts.3o.gen Alerts.Top1.3o.gen Alerts.Top2.3o.gen) 788 + (targets Alerts.3o.gen Alerts.Top1.3o.gen) 795 789 (action 796 790 (run odoc man-generate -o . --extra-suffix gen %{dep:../alerts.odocl})) 797 791 (enabled_if ··· 806 800 (alias runtest) 807 801 (action 808 802 (diff Alerts.Top1.3o Alerts.Top1.3o.gen)) 809 - (enabled_if 810 - (>= %{ocaml_version} 4.04))) 811 - (rule 812 - (alias runtest) 813 - (action 814 - (diff Alerts.Top2.3o Alerts.Top2.3o.gen)) 815 803 (enabled_if 816 804 (>= %{ocaml_version} 4.04)))) 817 805
-12
test/generators/man/Alerts.3o
··· 33 33 .nf 34 34 .sp 35 35 \f[CB]module\fR Top1 : \f[CB]sig\fR \.\.\. \f[CB]end\fR 36 - .fi 37 - .br 38 - .ti +2 39 - Top-comment\. 40 - .nf 41 - .sp 42 - \f[CB]module\fR Top2 : \f[CB]sig\fR \.\.\. \f[CB]end\fR 43 - .fi 44 - .br 45 - .ti +2 46 - Top-comment\. 47 - .nf 48 36 .sp 49 37 \f[CB]val\fR d : int 50 38 .fi
+2 -2
test/generators/man/Alerts.Top1.3o
··· 9 9 .in 10 10 .sp 11 11 .fi 12 - Top-comment\. 12 + @deprecated: A 13 13 .nf 14 14 .sp 15 15 .fi 16 - @deprecated: A 16 + Top-comment\. 17 17 .nf 18 18 .SH Documentation 19 19 .sp
-21
test/generators/man/Alerts.Top2.3o
··· 1 - 2 - .TH Top2 3 "" "Odoc" "OCaml Library" 3 - .SH Name 4 - Alerts\.Top2 5 - .SH Synopsis 6 - .sp 7 - .in 2 8 - \fBModule Alerts\.Top2\fR 9 - .in 10 - .sp 11 - .fi 12 - Top-comment\. 13 - .nf 14 - .sp 15 - .fi 16 - @deprecated: A 17 - .nf 18 - .SH Documentation 19 - .sp 20 - .nf 21 -
-1
test/generators/man/alerts.targets
··· 1 1 Alerts.3o 2 2 Alerts.Top1.3o 3 - Alerts.Top2.3o