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

Something weird when "---" comes in. #47

Closed
allenfantasy opened this issue Feb 7, 2014 · 7 comments
Closed

Something weird when "---" comes in. #47

allenfantasy opened this issue Feb 7, 2014 · 7 comments

Comments

@allenfantasy
Copy link

I got a really weird issue as following:

  • I've created a file called index.md:
Testing
======
  • Then I try to open this file. No respond from the server. No browser tab opened.
  • Then I add --- at the 1st line of this fine, save and exit. When I reopen the file it's working very good.
  • Then I try to delete this line in Vim, this preview is working well. But after I save and exit, the same problem occurs.

So the conclusion is: something wrong when open the markdown file. And this problem may be related to ---

I've check the needed gems / node:

  • redcarpet (3.0.0)
  • pygments.rb (0.5.4)
  • nodejs: v0.10.24
  • instant-markdown-d@0.0.8

Plus I've try instructions in #41 by adding set shell=bash\ -i in my .vimrc file, since I am using Mavericks.

Any help would be appreciated 😃

@suan
Copy link
Collaborator

suan commented Mar 5, 2014

So, let me try to understand better. If you do echo '---' | instant-markdown-d, does it work? How about echo -e "---\nTitle\n===" | instant-markdown-d?

@allenfantasy
Copy link
Author

both work and open a new tab on the browser.

@suan
Copy link
Collaborator

suan commented Mar 5, 2014

So, I've tried many variations of opening a file which already has --- at the top, removing that line, and adding it back, opening the file again - but the output is always correct. (just FYI, a --- with nothing directly able it is supposed to render as a squiggly line as seen at the top of the README here)

If you still can't get it working, try reinstalling instant-markdown-d, which I just fixed an issue with using the latest version of redcarpet.

@allenfantasy
Copy link
Author

First I've reinstalled instant-markdown-d. Then I try two types of markdown files

This one is not working:

### Title
---

while this one works:

---
# Title

Is there any ways I could do to debug this? I want to check where's going wrong but don't know how to start

@suan
Copy link
Collaborator

suan commented Mar 7, 2014

I've tested

### Title
---

and it works for me.

To debug, first find where your instant-markdown-d nom module is installed. Then, open <dir>/node_modules/docter/bin/github-flavored-markdown.rb. Within that Ruby file put file debug statements like File.open('/tmp/test.txt', 'a'){ |f| f.puts somevar.inspect }

@suan
Copy link
Collaborator

suan commented Mar 7, 2014

Might also try upgrading redcarpet to the latest version...

@stale
Copy link

stale bot commented Jan 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Would not fix label Jan 9, 2021
@stale stale bot closed this as completed Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants