-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in manpage creation using dash #274
Comments
This is actually a good question, i think we actually switched from |
we (sergiodj, samueloph and I) are suspecting the problem is in |
Now I think I've found the answer. sh and, consequently, dash interpret some escaped characters as control sequences, so an So, my question is: should we double escape diff --git a/doc/gen-man.sh b/doc/gen-man.sh
index 4463c5a..52b5132 100755
--- a/doc/gen-man.sh
+++ b/doc/gen-man.sh
@@ -59,8 +59,8 @@ gem_in=$(
# First expression replaces all [Text like this] with bold text.
# Second expression replaces text like *This* or _this_ with italic text.
sed -E \
- -e 's#\[([^]]*)\]#\\fB\1\\fR#g' \
- -e 's#(^|[.,!? ]+)[*_]([^*_ ]+[^*_]+[^*_ ]+)[*_]($|[.,!? ])#\1\\fI\2\\fR\3#g'
+ -e 's#\[([^]]*)\]#\\\\fB\1\\\\fR#g' \
+ -e 's#(^|[.,!? ]+)[*_]([^*_ ]+[^*_]+[^*_ ]+)[*_]($|[.,!? ])#\1\\\\fI\2\\\\fR\3#g'
)
# Convert gemtext to man format |
Yeah, can you try make a PR? |
Yeah, of course! |
I think we can close this issue, right? |
Hi, Felix. I'm here again :-)
So Debian links /bin/sh to /bin/dash to interpret commands. The problem is dash doesn't support different locales and it's breaking the
sed -E
command. Invoking bash explicitily solves the problem.The problem:
![Screenshot from 2023-06-01 22-03-09](https://private-user-images.githubusercontent.com/34252251/242763879-6465998c-fcf3-4d49-89bb-1f68c52eda6c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4MDEzMDQsIm5iZiI6MTcxOTgwMTAwNCwicGF0aCI6Ii8zNDI1MjI1MS8yNDI3NjM4NzktNjQ2NTk5OGMtZmNmMy00ZDQ5LTg5YmItMWY2OGM1MmVkYTZjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAxVDAyMzAwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4Njg0MzYyNDc2NDZhZmUzODhkMzM0MmIwOWVkNDJiYzI4NGJjNzZjY2QyZGY4N2VlZGYzZDIzZGU2YWNlMTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.g8Tcwb0I8_sCIt51S0HBPeJbj9Cpq4fjCmFrgwcG5-s)
Using
![Screenshot from 2023-06-01 22-03-49](https://private-user-images.githubusercontent.com/34252251/242763937-5b21890d-c5c8-44b9-97e5-b5f1d36e0f59.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4MDEzMDQsIm5iZiI6MTcxOTgwMTAwNCwicGF0aCI6Ii8zNDI1MjI1MS8yNDI3NjM5MzctNWIyMTg5MGQtYzVjOC00NGI5LTk3ZTUtYjVmMWQzNmUwZjU5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAxVDAyMzAwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIyOGNmODU3NDcxOTQ2YjZkYzg0NmMzNTUxYTBiZjc2M2M3MjcyNjZhM2IyMjE1NThiZWFjZGU3Zjg0NDdkZTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.NOzg5jf8wJfzYHuHxpOcnhkBIoG9kMPhJ_LjrxAoH40)
#!/bin/bash
:Now, is it ok to change the hashbang to
/bin/bash
? I'm thinking about users outside Debian (like BSD and MacOS)The text was updated successfully, but these errors were encountered: