-
Notifications
You must be signed in to change notification settings - Fork 295
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
custom syntax for code block #138
Comments
This How this works in either way is that there's a list of recognized languages for the fenced-code-blocks (see here) and if However, if Does this help? |
I'm using it just as an alias of another language. The fenced-code-blocks is what I need. Thank you very much. |
You're welcome. |
I just tried that, but it not work at all. I'm not aware about coffee script as well as atom. I'm sorry to troubled you again and again, but please let me know where I went wrong. cd into from:
to:
restart atom |
Not a problem. There are some instructions in the README on how the grammar of this package is compiled. The thing with your approach though, is that it will break every time Is your |
```run to indicate that this piece of code should will run in the browser through my custom markdown parser, while it also visible in other standard markdown parser. |
I think I know a better already available solution. There's support for, darn it, I forgot the name, something like custom attributes, or special attributes or something. It would look something like this: ```javascript {run} If you could adapt your custom markdown parser to recognize this pattern (the curly braces notation is often used, in Extra Markdown and R Markdown for instance) then I believe you're all set. It will still be recognized and highlighted as Javascript, and you needn't worry about updates. |
Have a look at this spec to get an idea of what else the notation is used for. You could easily extend your own parser with additional functionality if needed. |
It look good. I'm trying to make it work. |
Let me know how it works out. Bed time over here, so I'll check in again tomorrow. Good luck! |
I had checked the r markdown specification and had learn about the knitr engine. And I found these problems:
|
R Markdown support is indeed still incomplete, see #93. I've added the trailing space as a bug there, but I have to admit that priority to fully implement R Markdown is not high. A big part of that is the Are you thinking of dropping your custom parser in favor of R Markdown? It is an interesting superset of Markdown, but there's a good chance that syntax highlighting within R Markdown blocks won't happen. Can you make your custom parser work with the |
I had add basic r markdown support for marked, a parser in javascript. |
If you have to add it yourself, I still suggest going with the |
The engin argument is not important in markdown, the |
Well, since |
That's fine, thank you |
Where can I find the |
@Edenharder I'm not sure what you are looking for. Could you explain it in a bit more detail? Also, if it is unrelated to this issue, please create a new one. |
In the file fenced-code.md, it says that
If I want to add support for a new language, for example, latex. And I have installed the package language-latex already. Then I need to find out where 'source.latex' is to configure fenced-code.md. But I do not know where it will be usually. |
That depends on the language ; ) The The easiest way to find this scope is to open the main grammar file for a language (grammars/language-markdown.json in the case of this package) and (usually) near the top of the file you'll see an item named Latex will be added in an upcoming version though. I've recently added support for inline math, and it's part of that. If you need help with any other languages, feel free to open a new issue, point me to the language-packages, and it should be in the next version. |
I'm trying making something like this
and want the code to be highlighted just like well-known language syntax
How can i do it?
The text was updated successfully, but these errors were encountered: