atom/markdown-preview

Preview shows for some .md files but not others

yuqli opened this issue · 5 comments

yuqli commented

Prerequisites

Description

I have two .md files. When clicking "Packages - markdown preview plus - toggle preview", one of them generates a preview on another panel, while the other does not. I am trying to get both of them generate previews.

Versions

apm 1.18.12
npm 3.10.10
node 6.9.5 x64
atom 1.24.0
python 2.7.13
git 2.11.0

MacOS Sierra 10.12.6

Additional Information

The file that works:

#### 20180306
####

### Introduction
China is the largest mobile market in the world with over 1 billion smart mobile devices in active use every month, creating a huge market for online advertisement. 

However, ad frauds are also common.
Estimation is 90% of daily clicks on mobile app ads are potentially fraudulent. Fraud users produce lots of clicks on an app, but never really download and use it.

The goal of this project is to prevent advertisement fraud by detecting fradulent traffic. Specifically, we aim to build an algorithm that predict whether a user will download an app after clicking a mobile app ad.

The file that does not work:


---
layout: post
title: Hello World! 
---

This is a blog for technical posts...

rsese commented

Thanks for the report - I gave it a try with the file that you said doesn't work and preview worked ok for me on macOS 10.12.6 with Atom 1.24.

From the checkboxes you added to the Prerequisites section, it seems like you weren't able to reproduce in safe mode is that correct? Also, when you say that the second file doesn't generate a preview, do you mean that nothing happens or do you get an error of some kind?

@yuqli If its any help, I have noticed if you have more than one markdown file opened, it will only preview the markdown file in the first tab. You need to drag the tab for the other markdown file to be the first and then run 'Markdown Preview: Toggle'.

Atom's 'Pending Pane Elements' feature could be involved. If the .md file is not totally "open" (meaning, it's still showing with an italicized title in the tab bar), Markdown Preview will not generate the preview pane when selecting 'Toggle Preview'.

I couldn't find any errors or warnings that get spit out when attempting this, I'm afraid. Still, perhaps this can explain the behavior?

(Atom 1.24.1 on OS X 10.13.3, markdown-preview 0.159.20)

yuqli commented

Hi guys, thanks for the reply! Apologize for getting back late... My bad...

Here is what I have done:

  1. RE @bencooling Thanks for the reminder, but when I have two other .md files opened in one panel and click preview, it works fine. i.e. I could see both previews on the other panel.
  2. RE @rydash Thanks, but I don't think this is the issue. The file is not showing with an italicized title in the tab bar.
  3. RE @rsese I was not able to reproduce in the safe mode because the safe mode does not have the package "markdown preview plus"? The second file, when I clicked "Toggle Preview" nothing happened.

I attach some figures below in case useful...

This is when nothing happened after clicking preview.

screen shot 2018-03-12 at 8 28 17 pm

This is the file that does generate preview...

screen shot 2018-03-12 at 8 29 02 pm

I finally find out why this doesn't work. If the file isn't being displayed as a text file, it won't even open the markdown display.
To fix it, CTRL-SHIFT-L and choose txt file type. Then retry CTRL-SHIFT-M.