Skip to content

Commit 1deb31b

Browse files
committed
hide internal docs
1 parent 9d9dd1b commit 1deb31b

File tree

4 files changed

+2373
-2314
lines changed

4 files changed

+2373
-2314
lines changed

jscomp/bsb/bsb_arg.ml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,29 +70,31 @@
7070
max_col := String.length key
7171
);
7272
Ext_list.iter speclist (fun (key,_,doc) ->
73-
buf +> " ";
74-
buf +> key ;
75-
buf +> (String.make (!max_col - String.length key + 2 ) ' ');
76-
let cur = ref 0 in
77-
let doc_length = String.length doc in
78-
while !cur < doc_length do
79-
match String.index_from_opt doc !cur '\n' with
80-
| None ->
81-
if !cur <> 0 then begin
82-
buf +> "\n";
83-
buf +> String.make (!max_col + 4) ' ' ;
84-
end;
85-
buf +> String.sub doc !cur (String.length doc - !cur );
86-
cur := doc_length
87-
| Some new_line_pos ->
88-
if !cur <> 0 then begin
89-
buf +> "\n";
90-
buf +> String.make (!max_col + 4) ' ' ;
91-
end;
92-
buf +> String.sub doc !cur (new_line_pos - !cur );
93-
cur := new_line_pos + 1
94-
done ;
95-
buf +> "\n"
73+
if not (Ext_string.starts_with doc "*internal*") then begin
74+
buf +> " ";
75+
buf +> key ;
76+
buf +> (String.make (!max_col - String.length key + 2 ) ' ');
77+
let cur = ref 0 in
78+
let doc_length = String.length doc in
79+
while !cur < doc_length do
80+
match String.index_from_opt doc !cur '\n' with
81+
| None ->
82+
if !cur <> 0 then begin
83+
buf +> "\n";
84+
buf +> String.make (!max_col + 4) ' ' ;
85+
end;
86+
buf +> String.sub doc !cur (String.length doc - !cur );
87+
cur := doc_length
88+
| Some new_line_pos ->
89+
if !cur <> 0 then begin
90+
buf +> "\n";
91+
buf +> String.make (!max_col + 4) ' ' ;
92+
end;
93+
buf +> String.sub doc !cur (new_line_pos - !cur );
94+
cur := new_line_pos + 1
95+
done ;
96+
buf +> "\n"
97+
end
9698
)
9799
;;
98100

jscomp/main/bsb_main.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ let bsb_main_flags : (string * spec * string) list=
7171
https://github.com/bucklescript/bucklescript/tree/master/jscomp/bsb/templates";
7272

7373
"-regen", unit_set_spec force_regenerate,
74-
"(internal) Always regenerate build.ninja no matter bsconfig.json is changed or not (for debugging purpose)";
74+
"*internal* \n\
75+
Always regenerate build.ninja no matter bsconfig.json is changed or not";
7576
"-themes", call_spec Bsb_theme_init.list_themes,
7677
"List all available themes";
7778
"-where",

0 commit comments

Comments
 (0)