Skip to content
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

Code Block syntax highlighting #11

Open
radaniba opened this issue Sep 12, 2013 · 9 comments
Open

Code Block syntax highlighting #11

radaniba opened this issue Sep 12, 2013 · 9 comments
Labels

Comments

@radaniba
Copy link

The syntax highlighting is working on Firefox, Chrome, but not on Safari.
Did not test yet on IE

Thanks

UPDATE : Apologize, actually Safari works fine as well but we need to make a line return for it to work

@patbenatar
Copy link
Owner

@biocodershub Thanks for reporting this odd behavior.. Can you send me the example Markdown doc that was failing to highlight in Safari?

@radaniba
Copy link
Author

actually when you embed a code block, the highlighting comes and goes when you add a text after or even if you add/remove \n after the closing ``` Try add this code :

def check_path():
    """
    make sure the libsvm stuff is on the path
    """
    paths = (op.abspath(p) for p in os.environ['PATH'].split(":"))
    for p in paths:
        if op.exists(op.join(p, "/home/Utilities/libsvm-master/svm-train")): return True
    for path in ("../", "./"):
        if op.exists(path + "/home/Utilities/libsvm-master/svm-train"):
            os.environ['PATH'] += ":" + path
            return True

    print >>sys.stderr, "\n** /home//Utilities/libsvm-master/svm-train not found in path **\n" + ("*" * 80)

    return False

and then write (add) text and look at the highlighting while you write, you will see that the highlighting appears and disappears randomly

It is actually a behaviour in all the browsers

@patbenatar
Copy link
Owner

@biocodershub Yikes! Thanks for the report, I'll look into it when I have a minute.

@radaniba
Copy link
Author

You're welcome ! It is one of best editors I've seen till now, simple, elegant and fits perfectly to my needs. The only thing I am not able to figure out yet is adding tables, I tired all the markdown for tables, no one seems to be successfully parsed correctly, do you have a sample markdown for tables ?

Thanks again

@patbenatar
Copy link
Owner

Happy to hear it—simple and elegant were my two primary goals when creating Crevasse!

It should be possible to use tables as our markdown parser (Marked.js) supports them according to their docs.. Is this the syntax you're trying to use: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#wiki-tables

@radaniba
Copy link
Author

Yes, I tried the syntax in this url, it is not working.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

@patbenatar
Copy link
Owner

K I'll take a look

@radaniba
Copy link
Author

For the code highlight, there is another bug when you reload the page with a code block, look at the figure below

bug

You must click on the markdown and type some text so that it re-render the code block again

@patbenatar
Copy link
Owner

@biocodershub Yikes! Thanks for the report. I'll take a look when I have some time. Feel free to send a PR if you are able to isolate the problem code. 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants