什么语言使用[%%]

时间:2016-03-17 01:35:53

标签: javascript html

我正在学习编程并正在检查网站上的代码。我已经学到了一些东西,但我不认识这段代码中的[%和%]。这些东西是什么?

<div class="comment comment_inner">
[% if (data.comment.id) { %]
  <a href="#" class="collapse_toggle"></a>
[% } %]

<div class="by">
  [% if (data.view.hasProfilePicture()) { %]
    <a href="[%= data.comment.user.profile_url %]">
      <img src="[%= data.comment.user.profile_image %]" alt="[%= data.comment.user.display_name %]" />
    </a>
  [% } %]

[% if (data.comment.user.membership && data.comment.user.membership.short_bio) { %]
    <div class="name_container has_flair">
  [% } %]

1 个答案:

答案 0 :(得分:0)

它可以替换为任何其他非字母数字字符和非打印字符请参阅这里关于Ruby和Rails的简单事项https://simpleror.wordpress.com/