<commit_before>all: src/Unlit/String.hs README.md

test: test/ghcunlit
	runhaskell test/TestUnlit.hs
	make roundtrip

roundtrip:
	@for i in jekyll orgmode latex backtickfence tildefence; do \
		echo "$$i"; \
		unlit -t $$i -l haskell -i src/Unlit/Text.lhs -o test/roundtrip.1; \
		unlit -f $$i -t bird -i test/roundtrip.1 -o test/roundtrip.2; \
		diff test/roundtrip.2 src/Unlit/Text.lhs || exit 1; \
		for j in jekyll orgmode latex backtickfence tildefence; do \
			echo "  <-> $$j"; \<commit_msg>Add roundtrip test with empty lines removed (Currently failing)<commit_after>all: src/Unlit/String.hs README.md

test: test/ghcunlit
	runhaskell test/TestUnlit.hs
	make roundtrip

roundtrip:
	@for i in jekyll orgmode latex backtickfence tildefence; do \
		echo "$$i"; \
		unlit -t $$i -l haskell -i src/Unlit/Text.lhs -o test/roundtrip.1; \
		unlit -f $$i -t bird -i test/roundtrip.1 -o test/roundtrip.2; \
		diff test/roundtrip.2 src/Unlit/Text.lhs || exit 1; \
		for j in jekyll orgmode latex backtickfence tildefence; do \
			echo "  <-> $$j"; \
			unlit -f $$i -t $$j -i test/roundtrip.1 -o test/roundtrip.2; \
			unlit -f $$j -t $$i -i test/roundtrip.2 -o test/roundtrip.3; \
			diff test/roundtrip.1 test/roundtrip.3 || exit 1; \
		done; \
		echo "$$i without empty lines"; \
		sed '/^\s*$$/d' src/Unlit/Text.lhs > test/roundtrip.0; \
		unlit -t $$i -l haskell -i test/roundtrip.0 -o test/roundtrip.1; \
		unlit -f $$i -t bird -i test/roundtrip.1 -o test/roundtrip.2; \
		diff test/roundtrip.2 test/roundtrip.0 || exit 1; \
		for j in jekyll orgmode latex backtickfence tildefence; do \
			echo "  <-> $$j"; \
{'fraction_non_alphanumeric': 0.14879107253564786, 'fraction_numerical': 0.015499070055796652, 'mean_word_length': 2.8520286396181382, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5898241', 'n_tokens_mistral': 720, 'n_tokens_neox': 650, 'n_words': 185}