-
Notifications
You must be signed in to change notification settings - Fork 348
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
Add --html-highlight support for the HTML backend #3313
Conversation
e0c22be
to
f7d58bf
Compare
I have some better idea (to make this more consistent):
|
But I need help with the code structure -- can anyone tell me where does Agda convert |
I think that |
I've tried to compile the following # A Post
```
module literatetest where
```
This comment should be left as is. and this is what I get: <!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>literatetest</title>
<link rel="stylesheet" href="Agda.css">
</head>
<body>
<pre>
# A Post
```
<a id="15" class="Keyword">module</a>
<a id="22" href="literatetest.html" class="Module">literatetest</a>
<a id="35" class="Keyword">where</a>
```
This comment should be left as is.
</pre>
</body>
</html> I don't think that's the intended output. The |
I think most of the interesting code can be found in |
@ice1000
The highlighting information comes out as a
Consecutive characters with the same role are grouped together as a I hope this answered your questions. |
@vlopezj Thank you! Will implement my new idea tonight. |
How about |
What about |
It sounds strange when More suggestions:
|
I think we should also remove the ``` around code blocks. |
I like |
Also, this should only work with the HTML backend:
|
I think I'll have to un-escape the special characters. |
Fixed tests |
Is it my fault? |
… flag Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Thanks! |
Thank you for contributing! |
Oh no! I can't find my test! |
That looks like just the feature I need for writing talk slides with markdown! Shall try it out. |
Currently I use it in this way:
But it's much less work compared to using the markdown frontend + HTML backend before this PR, which requires you to unwrap nearly every I hope if someone (or me in the future maybe?) could find a way to reduce the steps. |
I suggest that when Agda outputs Markdown the extension should be
Pandoc can do something like this. |
I can think of For usability, we can also have a For even more flexibility, instead of the |
I consider this silly, since HTML files generated by Agda are using relative links which depends on the HTML files' name, so it's a bad choice to change the file name. |
Let me do this. |
Signed-off-by: ice1000 ice1000kotlin@foxmail.com
This can close #3137 which is originally my little suggestion.
I know I didn't add tests, examples, etc. That's because I'm not very sure about how to add tests.
A list of what I've done here:
.agda
file with some comments, no<a>
generated for themSuggestions with instructions or examples are welcomed!