Joomla Code荧光笔扩展问题

时间:2013-11-19 20:08:18

标签: php joomla pre codehighlighter

我正在为大学设计一个Joomla网站。用户应该能够发布与Android编程相关的教程。

http://www.jciadt.com/cms/ca

目前我正在努力让用户发布的文章成功显示代码片段。

我调查了这个扩展名:

http://alexgorbatchev.com/SyntaxHighlighter/

它看起来像一个可行的选项,但是当我包含代码片段时,我的文章会得到不希望的结果:

见下文:

http://www.jciadt.com/cms/ca/index.php/tutorials/beginner/9-layout-ui-options-part-i

滚动到页面底部到嵌套列表部分,看看我的意思。

有谁知道可能是什么问题?

1 个答案:

答案 0 :(得分:0)

我会采用以下方法来确定发生了什么:

#1 比较内容,即原始源代码,以确保其格式正确。如果您指的是将<Button元素缩进并将各种android:属性作为问题,我注意到的一件事是the page linked中的空格数量错误与之前的行相比,他们继续前进。之前的所有行似乎都使用标准4 spaces每个tab停止,最后一行使用6个空格。

当我将您的代码复制到此答案中时,我发现同样的问题,所以我猜它会出现在原始代码中。

<LinearLayout ... >
  <TextView ... />
  <EditText ... />
  <LinearLayout
    android:layout_gravity="center" 
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"  >   

<Button
      android:layout_width="150dp"
      android:layout_height="wrap_content"
      android:layout_gravity="center" 
      android:layout_weight="1"
      android:padding="5dp"
      android:gravity="center"
      android:text="@string/setName" />
    <Button
      android:layout_width="150dp"
      android:layout_gravity="center" 
      android:layout_height="wrap_content"
      android:layout_weight="1"
      android:padding="5dp"
      android:gravity="center"
      android:text="@string/clearName" />
  </LinearLayout>
</LinearLayout>

#2 如果内容正确,那么code highlighter extensionsJoomla Extension Directory)上有多少JED个,我会尝试几个不同的。如果它们都有相同的问题,那么您可能已经错过了代码示例中的内容。