-
Notifications
You must be signed in to change notification settings - Fork 325
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
Support for question.md file as alternative to question.html #7467
Conversation
This seems very useful! I have two tangentially related questions (not necessarily worth piggybacking with this but mainly curiosity):
|
These would likely require some configuration that involves changes in database, schema, sync, etc. which would be considerably more work than what is listed in this PR. I don't think they would be hard per se, it's just that they are not as trivial. |
Problem: elements like
causes the pl-answer lines to include
will not render the markdown formatting. |
One option to at the same time provide support for constructs like the one above and to make these a bit closer to markdown-flavoured is to use directives. So something like:
this would also simplify how elements like
This could be implemented with the |
Dang, this is exactly the problem I was worried about (nesting MD inside HTML inside MD). The comment below Example 109 indicates that some MD implementations allow a I'm not super excited by directives. I'm worried that this is a pretty niche syntax that won't be well-supported by editors and other MD processors. I'd want to know a lot more about this before jumping in to such a substantial syntax change. I wonder whether we'd be better off sticking with HTML but devoting more effort to improved editor support, such as WYSIWYG in-browser editors, VSCode plugins, etc. If the MD support that we want is small (do we want things beyond bold/italic/code?) then we could also consider implementing this ourselves directly on the HTML, like we do with latex where we treat $-pairs specially in HTML. |
Just adding these as notes. Support for markdown directives:
Support for markdown=1:
|
So would the idea be for PL to automagically insert That doesn't sound TOO bad - right? P.S. FWIW, I'm a fan of directives, but I agree it's relatively early in their support/adoption and would be painful if it was changed. That said, The nice thing is that as @jonatanschroeder pointed out with |
Unlikely. What I personally find a better approach is that the markdown pre-processing done in |
All images
|
Closing as the current approach is unlikely to get track. |
Support for a markdown-only version of question.html. Elements are still supported as usual, with HTML-like tags inside markdown itself. This only affects freeform questions (i.e., v3), legacy questions are not affected.
For backwards compatibility, if a question has both question.html and question.md files, the HTML file takes precedence. Also, errors reading question.html other than "file does not exist" still trigger an issue.
Pending: