Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 从<;预处理>;标记为.min.js的标记_Javascript_Markdown_Javascript Marked - Fatal编程技术网

Javascript 从<;预处理>;标记为.min.js的标记

Javascript 从<;预处理>;标记为.min.js的标记,javascript,markdown,javascript-marked,Javascript,Markdown,Javascript Marked,我目前正在开发一个在线文本编辑系统,可以处理降价文件。编辑器工作正常(在用户编辑文件时,使用marked.min.js解析markdown输入以进行预览),但在实现仅用于显示的页面时,我发现了一个奇怪的问题 我想使用相同的markdown解析器,因此必须使用marked.min.js在客户端解析文件 我想在 window.onload=function(){ document.getElementById('markdown-description').innerHTML =

我目前正在开发一个在线文本编辑系统,可以处理降价文件。编辑器工作正常(在用户编辑文件时,使用marked.min.js解析markdown输入以进行预览),但在实现仅用于显示的页面时,我发现了一个奇怪的问题

我想使用相同的markdown解析器,因此必须使用marked.min.js在客户端解析文件 我想在

window.onload=function(){
        document.getElementById('markdown-description').innerHTML =
            marked(document.getElementById('markdown-raw').innerHTML);
} 
然而,我看到,尽管在编辑器中可以工作,但并非所有引号都被解析。当我禁用解析器并查看

<div class="description" id="markdown-description"><pre id="markdown-raw"> # Dillinger

Dillinger is a cloud-enabled, mobile-ready, offline-storage, AngularJS powered HTML5 Markdown editor.



  - Type some Markdown on the left
  - See HTML in the right
  - Magic

Markdown is a lightweight markup language based on the formatting conventions that people naturally use in email.  As [John Gruber] writes on the [Markdown site][df1]

> The overriding design goal for Markdown's
> formatting syntax is to make it as readable
> as possible. The idea is that a
> Markdown-formatted document should be
> publishable as-is, as plain text, without
> looking like it's been marked up with tags
> or formatting instructions.

This text you see here  </pre></div> 
有人能解释为什么会出问题吗

我的HTML代码:

#迪林杰
Dillinger是一个支持云、支持移动、离线存储、支持AngularJS的HTML5降价编辑器。
-在左边键入一些标记
-请参见右侧的HTML
-魔力
Markdown是一种基于人们在电子邮件中自然使用的格式约定的轻量级标记语言。正如[John Gruber]在[Markdown site][df1]上所写的那样
>Markdown的首要设计目标
>格式化语法是为了使其可读
>尽可能的。这个想法是
>标记格式的文档应为
>可按原样出版,如纯文本,无需
>看起来像是用标签标记的
>或格式化指令。
这是你在这里看到的文本

What's
markdown description
和What's
markdown raw
。请分享你的HTML。我已经在控制台中添加了HTMLAny错误的相关部分?不,没有错误。除引号外,所有标记都被正确解析,这些引号显示为正常段落,文本中仍有
。在
生效之前添加空格?什么是
标记说明
和什么是
标记原始
。请分享你的HTML。我已经在控制台中添加了HTMLAny错误的相关部分?不,没有错误。除引号外,所有标记都被正确解析,这些引号显示为正常段落,文本中仍有
。是否在
生效之前添加空格?
<div class="description" id="markdown-description"><pre id="markdown-raw"> # Dillinger

Dillinger is a cloud-enabled, mobile-ready, offline-storage, AngularJS powered HTML5 Markdown editor.



  - Type some Markdown on the left
  - See HTML in the right
  - Magic

Markdown is a lightweight markup language based on the formatting conventions that people naturally use in email.  As [John Gruber] writes on the [Markdown site][df1]

> The overriding design goal for Markdown's
> formatting syntax is to make it as readable
> as possible. The idea is that a
> Markdown-formatted document should be
> publishable as-is, as plain text, without
> looking like it's been marked up with tags
> or formatting instructions.

This text you see here  </pre></div>