-
Notifications
You must be signed in to change notification settings - Fork 6
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
Collapsed reference links converted in POT to shortcut reference links #221
Comments
Thanks. The problem is essentially that MD4C parser does not provide information about the formatting of the links, so I can't differentiate between md2po --debug test.md
This was implemented in #204 (here) and could be implemented in either format, always being the same for all, but used this because is simpler. As I can see, Github accept all possible formats as valid links:
Really this issue is a duplicate of #152, but as said, is not possible to implement it, at least for now. Of course, PRs are welcome! Do you know other parsers that would not be able to parse links like |
Thanks @mondeja for the clarification! Since I have usually followed John Gruber's original specs, I've never used So, since the parsing issue is out of your control, and the choice between |
(After the last comments from #164.)
According to CommonMark link specs, a collapsed reference link like
[foo][]
and a shortcut reference link like[foo]
should both be valid and equivalent to[foo][foo]
.However,
md2po
0.3.84 converts collapsed links to shortcut ones in POT entries. For instance, with atest.md
with the following content:the command
md2po test.md > test.po
creates these entries (I added the missing translation):Then
po2md -p test.po -s /dev/stdout test.md
produces:The final output is correct, the issue is that PO strings slightly differ from the original ones. I would expect that both
[foo][]
and[foo]
keep their shape in the PO file.Please note that the original Markdown contemplated
[foo][]
but not[foo]
as valid links, so thay may affect some editors or syntax highlighters (like GitHub's).This started happening with mdpo 0.3.80 (while 0.3.79 would convert them to
[example.com][example.com]
instead, which confuses some translators).Thank you!
The text was updated successfully, but these errors were encountered: