This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/docs/fix_md
2015-09-21 17:05:36 -05:00

36 lines
718 B
Plaintext

:- style_check(all).
:- yap_flag( write_strings, on).
%:- yap_flag( gc_trace, verbose ).
:- use_module(library(readutil)).
:- use_module(library(lineutils)).
:- use_module(library(lists)).
:- use_module(library(maplist)).
:- use_module(library(system)).
:- initialization(main).
:- style_check(all).
:- yap_flag( double_quotes, string ).
%:- yap_flag( dollar_as_lower_case, on ).
main :-
nb_setval( state, out ),
repeat,
read_line_to_codes( S, Codes ),
( String == end_of_file
->
!
;
nb_getval( state, S0 ),
fix_indent( Codes, NCodes, S, S0),
nb_setval( state, S ),
format('~s', [NCodes]),
fail
).
fix_indent( Codes, NCodes, out, S0 ) :-