【问题标题】:What does a ':' in Markdown do?Markdown 中的 ':' 有什么作用?
【发布时间】:2012-09-22 19:19:02
【问题描述】:

我一直在处理我的简历,并决定放弃 word 文档并切换到 markdown。我 fork markdown-resume 并一直在努力移植我的简历,但遇到了一些问题。我对 markdown 和 css 不太熟悉,但我设法根据自己的喜好更改了一些东西。

我在想办法

### Education {#education}

University of Nebraska-Lincoln
: *Bachelor of Science in Computer Engineering*
  __2011 - 2015__

被翻译成

<dl>
  <dt>University of Nebraska-Lincoln</dt>
  <dd><em>Bachelor of Science in Computer Engineering</em>
  <strong>2011 - 2015</strong></dd>
</dl>

我知道build.php 运行

$resume   = file_get_contents($source);
$resume = Markdown($resume);
$resume = SmartyPants($resume);

然后使用渲染

$m = new Mustache;
$rendered = $m->render(
    $template,
    array(
        'title'  => $title,
        'style'  => $style,
        'resume' => $resume,
        'reload' => $refresh_dev
    )
);

其中$template 是html 基本模板,$style 是包含"/assets/css/*.css"AssetCollection

我认为分号可能与它有关。这是css files being used的链接。

【问题讨论】:

  • 我猜在这种情况下那是一个分隔符。对于其中的每一个,都会采取一定的行动。类似于*_
  • 好吧,来自 Markdown 文档,*...* = _..._ &lt;em&gt;...&lt;/em&gt;**...** = __...__ = &lt;strong&gt;...&lt;/strong&gt;。不过,我找不到任何关于分号的信息。

标签: php html css markdown mustache


【解决方案1】:

冒号将当前行视为上一行的定义。

例子:

Markdown
: A nifty little tool to write richly formatted text using plain text formatting!

Stackoverflow
: A community of brilliant minds.

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2021-10-23
  • 1970-01-01
  • 1970-01-01
  • 2019-12-13
  • 2019-11-27
  • 1970-01-01
  • 2023-03-14
相关资源
最近更新 更多