-
Notifications
You must be signed in to change notification settings - Fork 34
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
Test: URL link over mixed formatting #45
Comments
Could you please state what /you/ would expect. For me the 2nd and 4th line is malformed. And for a one to one translation to HTML xmllint agrees with me.
A quick test with GNU Emacs 27.2 and Org mode 9.4.6 shows the asterisk is in the link (underlined), exactly as you've written it down. But only the 2nd line is bold, the 4th not. Inconsistent! Unfortunately Markdown has no |
Hi, Here, we do have the issue that Org-mode is implemented in a clever way but not in a way that translates well to valid HTML/XML. For example: With XML/HTML you need to make sure that the form is a valid one. Clearly, the second and fourth line aren't valid at all for HTML. The Orgdown examples of mine are valid Org-mode syntax. If Orgdown is translated without thinking too much about that, that might end up in this invalid form. This might be very tricky to implement... |
Hello, totally forgot how frustrated I was with Org mode and editing links at the beginning. Never liked I know you got big heat for the name Orgdown alone. But this opportunity should be used to define a proper grammar. For a good reason example 2 and 4 are invalid everywhere else. If I would thinking about adding support to a tool, I would ignore these or not doing it at all. Here the result from pandoc:
As you introduced Orgdown I started to add a tool page for pandoc but quickly stopped as I was looking how different they treated the block examples. Could not decide on, supported as pandoc converted the examples, or partly because the result was different - or this not. If this example should be valid Orgdown I think pandoc doesn't even support links fully. But I don't think this is the right place for this discussion. BTW: curiosity got the better of me and I checked the export from org (C-c C-e h H)
If you add text before and after the link it is better to see that org is displaying as it is exporting. Please define a grammar for Orgdown where 2nd and 4th example are invalid as Org can't handle it for display and export! |
Sorry, totally got carried away and missed the point. Using Emacs Org mode to edit links direct might lead to this. And you need a solution to handle the mess. For this unfortunately I don't have one. Org mode and pandoc both fail. And I don't think there will be a general solution. Only for specific ones, and these might do even the wrong thing in an other specific case. I in your place would search for these and fix in the org source and try not to create a new one in the future. |
Off-topic: I understand the issues here and implications. However, me and the Orgdown initiative are not in the position of defining something that differs from the GNU Emacs implementation of Org-mode. Therefore, this needs to be addressed by the Org-mode ML. For lazyblorg (well, the most dominant issue of lazyblorg is to get a decent generic Orgdown parser), it is safe to neglect this issue here to a certain degree. I made other assumptions (empty line between two different markup elements, ...) in plenty places so far. Those might change after switching to a better parser. Until then, the syntax that lazyblorg understands is a small subset of Orgdown. See also #63 |
Add a test to see, if following is working as expected:
If an issue is detected, fix it accordingly.
Update 2022-01-23: line 2 and 4 of the example can't be directly converted to HTML/XML as they may result in invalid syntax (see discussion below). For now, it should be safe to ignore those cases. Maybe this issue can only be solved by switching to a better parser: #63
The text was updated successfully, but these errors were encountered: