Skip to content
Snippets Groups Projects
Commit 367bbd66 authored by Allan Blanchard's avatar Allan Blanchard
Browse files

Support ## format

parent 4872a979
No related branches found
No related tags found
1 merge request!91Support frama-c/<repo>#NN format
Pipeline #30936 passed
...@@ -40,9 +40,9 @@ let print_word fmt = function ...@@ -40,9 +40,9 @@ let print_word fmt = function
| PrivateBts n -> | PrivateBts n ->
Format.fprintf fmt "<a class=\"private\" href=\"%s%d\">#%d</a>" Format.fprintf fmt "<a class=\"private\" href=\"%s%d\">#%d</a>"
"http://bts.frama-c.com/view.php?id=" n n "http://bts.frama-c.com/view.php?id=" n n
| Gitlab(s, n) -> | Gitlab(pub, s, n) ->
Format.fprintf fmt "<a class=\"private\" href=\"%s%s%s%d\">#%d</a>" Format.fprintf fmt "<a class=\"private\" href=\"%s/%s/%s/%s/%d\">#%d</a>"
"https://git.frama-c.com/frama-c/" s "/issues/" n n "https://git.frama-c.com" (if pub then "pub" else "frama-c") s "issues" n n
| OldBts n -> | OldBts n ->
Format.fprintf fmt "<code>'%d'</code>" n Format.fprintf fmt "<code>'%d'</code>" n
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
| PublicBts of int | PublicBts of int
| PrivateBts of int | PrivateBts of int
| OldBts of int | OldBts of int
| Gitlab of string * int | Gitlab of bool * string * int
| Item of char | Item of char
| Space | Space
| Newline | Newline
...@@ -178,7 +178,7 @@ and text e = parse ...@@ -178,7 +178,7 @@ and text e = parse
(* | space+ (digit as k) ')' { add_word e (Item k) ; text e lexbuf } *) (* | space+ (digit as k) ')' { add_word e (Item k) ; text e lexbuf } *)
| "frama-c/" ((letter+) as sub) '#' ((digit+) as bug) | "frama-c/" ((letter+) as sub) '#' ((digit+) as bug)
{ add_word e (Gitlab(sub, int_of_string bug)) ; text e lexbuf } { add_word e (Gitlab(false, sub, int_of_string bug)) ; text e lexbuf }
| '#' ((digit+) as bug) | '#' ((digit+) as bug)
{ add_word e (PublicBts(int_of_string bug)) ; text e lexbuf } { add_word e (PublicBts(int_of_string bug)) ; text e lexbuf }
...@@ -190,7 +190,10 @@ and text e = parse ...@@ -190,7 +190,10 @@ and text e = parse
{ add_word e (OldBts(int_of_string bug)) ; text e lexbuf } { add_word e (OldBts(int_of_string bug)) ; text e lexbuf }
| "#@" ((digit+) as bug) | "#@" ((digit+) as bug)
{ add_word e (Gitlab("frama-c", int_of_string bug)) ; text e lexbuf } { add_word e (Gitlab(false, "frama-c", int_of_string bug)) ; text e lexbuf }
| "##" ((digit+) as bug)
{ add_word e (Gitlab(true, "frama-c", int_of_string bug)) ; text e lexbuf }
| '-' (letter | '-')+ | '-' (letter | '-')+
| '!'? (upper ident* '.')+ ident+ | '!'? (upper ident* '.')+ ident+
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment