1
0

Added Parsedown + ParsedownExtra + Prism

This commit is contained in:
Mike Schwörer 2014-07-10 22:32:47 +02:00
parent e17154d28c
commit 4ca578cfde
14 changed files with 2169 additions and 122 deletions

307
.idea/workspace.xml generated
View File

@ -3,11 +3,11 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="802a3fea-d257-43f4-acd0-825667875110" name="Default" comment=""> <list default="true" id="802a3fea-d257-43f4-acd0-825667875110" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" /> <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/scopes/scope_settings.xml" /> <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/scopes/scope_settings.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/www.mikescher.de.iml" /> <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/www.mikescher.de.iml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/misc.xml" /> <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/encodings.xml" /> <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/encodings.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/frameworkRootSettings.xml" /> <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/frameworkRootSettings.xml" />
</list> </list>
<ignored path="www.mikescher.de.iws" /> <ignored path="www.mikescher.de.iws" />
@ -63,28 +63,55 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf> <leaf>
<file leaf-file-name="ProgramsController.php" pinned="false" current="true" current-in-tab="true"> <file leaf-file-name="ParsedownHelper.php" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/www/protected/controllers/ProgramsController.php"> <entry file="file://$PROJECT_DIR$/www/protected/components/parsedown/ParsedownHelper.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="22" column="42" selection-start="392" selection-end="392" vertical-scroll-proportion="0.09582864" vertical-offset="289" max-vertical-offset="4420"> <state line="16" column="1" selection-start="243" selection-end="243" vertical-scroll-proportion="0.44663382" vertical-offset="0" max-vertical-offset="609">
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="LogController.php" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="view.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/controllers/LogController.php"> <entry file="file://$PROJECT_DIR$/www/protected/views/programs/view.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="14" column="74" selection-start="266" selection-end="266" vertical-scroll-proportion="0.0" vertical-offset="238" max-vertical-offset="3400"> <state line="93" column="63" selection-start="2699" selection-end="2699" vertical-scroll-proportion="-32.384617" vertical-offset="739" max-vertical-offset="2601">
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="admin.php" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="ProgramHelper.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/views/log/admin.php"> <entry file="file://$PROJECT_DIR$/www/protected/components/ProgramHelper.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="49" column="0" selection-start="1224" selection-end="1224" vertical-scroll-proportion="0.0" vertical-offset="188" max-vertical-offset="1105"> <state line="123" column="16" selection-start="2691" selection-end="2691" vertical-scroll-proportion="-18.653847" vertical-offset="1606" max-vertical-offset="2975">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="expandedLogHeader.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/components/widgets/views/expandedLogHeader.php">
<provider selected="true" editor-type-id="text-editor">
<state line="19" column="60" selection-start="477" selection-end="477" vertical-scroll-proportion="-12.423077" vertical-offset="0" max-vertical-offset="527">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="_ajaxMarkdownPreview.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/views/log/_ajaxMarkdownPreview.php">
<provider selected="true" editor-type-id="text-editor">
<state line="2" column="24" selection-start="31" selection-end="31" vertical-scroll-proportion="-1.3076923" vertical-offset="0" max-vertical-offset="136">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="main.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/views/layouts/main.php">
<provider selected="true" editor-type-id="text-editor">
<state line="23" column="59" selection-start="813" selection-end="813" vertical-scroll-proportion="-15.038462" vertical-offset="0" max-vertical-offset="2006">
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -103,8 +130,6 @@
<component name="IdeDocumentHistory"> <component name="IdeDocumentHistory">
<option name="changedFiles"> <option name="changedFiles">
<list> <list>
<option value="$PROJECT_DIR$/www/protected/views/log/create.php" />
<option value="$PROJECT_DIR$/www/protected/views/log/update.php" />
<option value="$PROJECT_DIR$/www/protected/views/log/view.php" /> <option value="$PROJECT_DIR$/www/protected/views/log/view.php" />
<option value="$PROJECT_DIR$/www/protected/views/msmain/admin_updateEGH.php" /> <option value="$PROJECT_DIR$/www/protected/views/msmain/admin_updateEGH.php" />
<option value="$PROJECT_DIR$/www/protected/views/msmain/error.php" /> <option value="$PROJECT_DIR$/www/protected/views/msmain/error.php" />
@ -130,23 +155,19 @@
<option value="$PROJECT_DIR$/www/protected/views/msmain/index.php" /> <option value="$PROJECT_DIR$/www/protected/views/msmain/index.php" />
<option value="$PROJECT_DIR$/www/protected/views/msmain/admin.php" /> <option value="$PROJECT_DIR$/www/protected/views/msmain/admin.php" />
<option value="$PROJECT_DIR$/www/protected/views/log/_form.php" /> <option value="$PROJECT_DIR$/www/protected/views/log/_form.php" />
<option value="$PROJECT_DIR$/www/protected/views/log/_ajaxMarkdownPreview.php" />
<option value="$PROJECT_DIR$/www/protected/views/api/captcha.php" /> <option value="$PROJECT_DIR$/www/protected/views/api/captcha.php" />
<option value="$PROJECT_DIR$/www/protected/controllers/APIController.php" /> <option value="$PROJECT_DIR$/www/protected/controllers/APIController.php" />
<option value="$PROJECT_DIR$/www/protected/views/programupdates/admin.php" /> <option value="$PROJECT_DIR$/www/protected/views/programupdates/admin.php" />
<option value="$PROJECT_DIR$/www/protected/views/log/admin.php" /> <option value="$PROJECT_DIR$/www/protected/views/log/admin.php" />
<option value="$PROJECT_DIR$/www/protected/models/Log.php" /> <option value="$PROJECT_DIR$/www/protected/models/Log.php" />
<option value="$PROJECT_DIR$/www/protected/config/main.php" />
<option value="$PROJECT_DIR$/www/protected/views/programs/index.php" /> <option value="$PROJECT_DIR$/www/protected/views/programs/index.php" />
<option value="$PROJECT_DIR$/www/protected/components/widgets/views/thumbnailProgPreview.php" /> <option value="$PROJECT_DIR$/www/protected/components/widgets/views/thumbnailProgPreview.php" />
<option value="$PROJECT_DIR$/www/protected/yiic.php" /> <option value="$PROJECT_DIR$/www/protected/yiic.php" />
<option value="$PROJECT_DIR$/www/protected/views/log/index.php" /> <option value="$PROJECT_DIR$/www/protected/views/log/index.php" />
<option value="$PROJECT_DIR$/www/protected/components/widgets/ProgDescription.php" /> <option value="$PROJECT_DIR$/www/protected/components/widgets/ProgDescription.php" />
<option value="$PROJECT_DIR$/www/protected/components/widgets/views/progDescription.php" /> <option value="$PROJECT_DIR$/www/protected/components/widgets/views/progDescription.php" />
<option value="$PROJECT_DIR$/www/protected/views/layouts/main.php" />
<option value="$PROJECT_DIR$/www/protected/components/widgets/views/progDescription_tabbed.php" /> <option value="$PROJECT_DIR$/www/protected/components/widgets/views/progDescription_tabbed.php" />
<option value="$PROJECT_DIR$/www/protected/views/programs/view.php" /> <option value="$PROJECT_DIR$/www/protected/views/programs/view.php" />
<option value="$PROJECT_DIR$/www/protected/components/ProgramHelper.php" />
<option value="$PROJECT_DIR$/www/protected/components/MsHelper.php" /> <option value="$PROJECT_DIR$/www/protected/components/MsHelper.php" />
<option value="$PROJECT_DIR$/www/protected/models/Program.php" /> <option value="$PROJECT_DIR$/www/protected/models/Program.php" />
<option value="$PROJECT_DIR$/www/css/styles.css" /> <option value="$PROJECT_DIR$/www/css/styles.css" />
@ -154,6 +175,12 @@
<option value="$PROJECT_DIR$/www/protected/views/programs/_form.php" /> <option value="$PROJECT_DIR$/www/protected/views/programs/_form.php" />
<option value="$PROJECT_DIR$/www/protected/controllers/LogController.php" /> <option value="$PROJECT_DIR$/www/protected/controllers/LogController.php" />
<option value="$PROJECT_DIR$/www/protected/controllers/ProgramsController.php" /> <option value="$PROJECT_DIR$/www/protected/controllers/ProgramsController.php" />
<option value="$PROJECT_DIR$/www/protected/config/main.php" />
<option value="$PROJECT_DIR$/www/protected/components/parsedown/ParsedownHelper.php" />
<option value="$PROJECT_DIR$/www/protected/components/ProgramHelper.php" />
<option value="$PROJECT_DIR$/www/protected/components/widgets/views/expandedLogHeader.php" />
<option value="$PROJECT_DIR$/www/protected/views/log/_ajaxMarkdownPreview.php" />
<option value="$PROJECT_DIR$/www/protected/views/layouts/main.php" />
</list> </list>
</option> </option>
</component> </component>
@ -167,7 +194,7 @@
<option name="x" value="55" /> <option name="x" value="55" />
<option name="y" value="-8" /> <option name="y" value="-8" />
<option name="width" value="1873" /> <option name="width" value="1873" />
<option name="height" value="1092" /> <option name="height" value="1096" />
</component> </component>
<component name="ProjectInspectionProfilesVisibleTreeState"> <component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default"> <entry key="Project Default">
@ -250,6 +277,20 @@
<sortByType /> <sortByType />
</navigator> </navigator>
<panes> <panes>
<pane id="Scope">
<subPane subId="Mikescher.de App">
<PATH>
<PATH_ELEMENT USER_OBJECT="Root">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="www.mikescher.de">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<PATH> <PATH>
@ -444,6 +485,28 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="www.mikescher.de" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="www.mikescher.de" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="www" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="protected" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="config" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH> <PATH>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="www.mikescher.de" /> <option name="myItemId" value="www.mikescher.de" />
@ -536,22 +599,34 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="css" /> <option name="myItemId" value="protected" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="components" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="parsedown" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
</subPane>
</pane>
<pane id="Scope">
<subPane subId="Mikescher.de App">
<PATH> <PATH>
<PATH_ELEMENT USER_OBJECT="Root"> <PATH_ELEMENT>
<option name="myItemId" value="" /> <option name="myItemId" value="www.mikescher.de" />
<option name="myItemType" value="" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="www.mikescher.de"> <PATH_ELEMENT>
<option name="myItemId" value="" /> <option name="myItemId" value="www.mikescher.de" />
<option name="myItemType" value="" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="www" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="css" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
</subPane> </subPane>
@ -711,29 +786,29 @@
</todo-panel> </todo-panel>
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="55" y="-8" width="1873" height="1092" extended-state="0" /> <frame x="55" y="-8" width="1873" height="1096" extended-state="6" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32873806" sideWeight="0.4997245" order="11" side_tool="false" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32873806" sideWeight="0.4997245" order="11" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3244963" sideWeight="0.4997245" order="6" side_tool="false" content_ui="tabs" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32661718" sideWeight="0.4997245" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24958678" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Framework" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3294766" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Framework" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3294766" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.27878788" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39448568" sideWeight="0.4997245" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39448568" sideWeight="0.4997245" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2214876" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3244963" sideWeight="0.5002755" order="9" side_tool="true" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3244963" sideWeight="0.5002755" order="9" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33722162" sideWeight="0.4997245" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2214876" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3244963" sideWeight="0.4997245" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24958678" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2815427" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33722162" sideWeight="0.4997245" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32661718" sideWeight="0.4997245" order="1" side_tool="false" content_ui="tabs" />
<window_info id="PHP-CGI Server" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> <window_info id="PHP-CGI Server" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
</layout> </layout>
</component> </component>
<component name="UnknownFeatures"> <component name="UnknownFeatures">
@ -761,25 +836,6 @@
</breakpoint-manager> </breakpoint-manager>
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/www/protected/views/log/admin.php">
<provider selected="true" editor-type-id="text-editor">
<state line="49" column="0" selection-start="1224" selection-end="1224" vertical-scroll-proportion="0.0" vertical-offset="188" max-vertical-offset="1105">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/msmain/about.php">
<provider selected="true" editor-type-id="text-editor">
<state line="97" column="64" selection-start="3708" selection-end="3708" vertical-scroll-proportion="2.882867" vertical-offset="0" max-vertical-offset="2210" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/MSController.php">
<provider selected="true" editor-type-id="text-editor">
<state line="14" column="0" selection-start="322" selection-end="322" vertical-scroll-proportion="0.4068376" vertical-offset="0" max-vertical-offset="585">
<folding />
</state>
</provider>
</entry>
<entry file="jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/com/jetbrains/php/lang/psi/stubs/data/date_c.php"> <entry file="jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/com/jetbrains/php/lang/psi/stubs/data/date_c.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="329" column="47" selection-start="12475" selection-end="12475" vertical-scroll-proportion="0.2888889" vertical-offset="5424" max-vertical-offset="10948" /> <state line="329" column="47" selection-start="12475" selection-end="12475" vertical-scroll-proportion="0.2888889" vertical-offset="5424" max-vertical-offset="10948" />
@ -815,21 +871,11 @@
<state line="52" column="5" selection-start="940" selection-end="940" vertical-scroll-proportion="-29.692308" vertical-offset="112" max-vertical-offset="1003" /> <state line="52" column="5" selection-start="940" selection-end="940" vertical-scroll-proportion="-29.692308" vertical-offset="112" max-vertical-offset="1003" />
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/log/_ajaxMarkdownPreview.php">
<provider selected="true" editor-type-id="text-editor">
<state line="2" column="59" selection-start="66" selection-end="66" vertical-scroll-proportion="0.03815937" vertical-offset="0" max-vertical-offset="891" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/msmain/admin.php"> <entry file="file://$PROJECT_DIR$/www/protected/views/msmain/admin.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="57" column="34" selection-start="1152" selection-end="1152" vertical-scroll-proportion="0.22895622" vertical-offset="765" max-vertical-offset="2227" /> <state line="57" column="34" selection-start="1152" selection-end="1152" vertical-scroll-proportion="0.22895622" vertical-offset="765" max-vertical-offset="2227" />
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/SeededRandom.php">
<provider selected="true" editor-type-id="text-editor">
<state line="40" column="5" selection-start="679" selection-end="679" vertical-scroll-proportion="0.667789" vertical-offset="0" max-vertical-offset="891" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/api/update.php"> <entry file="file://$PROJECT_DIR$/www/protected/views/api/update.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="130" vertical-scroll-proportion="-0.0" vertical-offset="0" max-vertical-offset="170" /> <state line="0" column="0" selection-start="0" selection-end="130" vertical-scroll-proportion="-0.0" vertical-offset="0" max-vertical-offset="170" />
@ -870,11 +916,6 @@
<state line="3682" column="27" selection-start="146162" selection-end="146162" vertical-scroll-proportion="0.52136755" vertical-offset="62170" max-vertical-offset="74018" /> <state line="3682" column="27" selection-start="146162" selection-end="146162" vertical-scroll-proportion="0.52136755" vertical-offset="62170" max-vertical-offset="74018" />
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/www/protected/config/main.php">
<provider selected="true" editor-type-id="text-editor">
<state line="69" column="121" selection-start="1642" selection-end="1642" vertical-scroll-proportion="0.0" vertical-offset="1020" max-vertical-offset="2108" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/programs/index.php"> <entry file="file://$PROJECT_DIR$/www/protected/views/programs/index.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="35" column="51" selection-start="690" selection-end="710" vertical-scroll-proportion="0.0" vertical-offset="408" max-vertical-offset="1394" /> <state line="35" column="51" selection-start="690" selection-end="710" vertical-scroll-proportion="0.0" vertical-offset="408" max-vertical-offset="1394" />
@ -905,11 +946,6 @@
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-5.7062936" vertical-offset="3264" max-vertical-offset="8483" /> <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-5.7062936" vertical-offset="3264" max-vertical-offset="8483" />
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/widgets/views/expandedLogHeader.php">
<provider selected="true" editor-type-id="text-editor">
<state line="14" column="41" selection-start="386" selection-end="386" vertical-scroll-proportion="0.42774567" vertical-offset="16" max-vertical-offset="595" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/widgets/ExpandedLogHeader.php"> <entry file="file://$PROJECT_DIR$/www/protected/components/widgets/ExpandedLogHeader.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="31" column="55" selection-start="626" selection-end="639" vertical-scroll-proportion="1.0154142" vertical-offset="0" max-vertical-offset="901" /> <state line="31" column="55" selection-start="626" selection-end="639" vertical-scroll-proportion="1.0154142" vertical-offset="0" max-vertical-offset="901" />
@ -925,26 +961,6 @@
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="680" /> <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="680" />
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/layouts/main.php">
<provider selected="true" editor-type-id="text-editor">
<state line="91" column="103" selection-start="2939" selection-end="2939" vertical-scroll-proportion="0.0" vertical-offset="1547" max-vertical-offset="1972" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/widgets/ProgDescription.php">
<provider selected="true" editor-type-id="text-editor">
<state line="21" column="49" selection-start="399" selection-end="399" vertical-scroll-proportion="0.0" vertical-offset="357" max-vertical-offset="612" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/widgets/views/progDescription_tabbed.php">
<provider selected="true" editor-type-id="text-editor">
<state line="7" column="12" selection-start="113" selection-end="113" vertical-scroll-proportion="0.0" vertical-offset="119" max-vertical-offset="425" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/programs/view.php">
<provider selected="true" editor-type-id="text-editor">
<state line="139" column="69" selection-start="3922" selection-end="3922" vertical-scroll-proportion="1.919192" vertical-offset="653" max-vertical-offset="2601" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/programs/update.php"> <entry file="file://$PROJECT_DIR$/www/protected/views/programs/update.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.0" vertical-offset="0" max-vertical-offset="527" /> <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.0" vertical-offset="0" max-vertical-offset="527" />
@ -982,16 +998,6 @@
<state line="700" column="20" selection-start="28914" selection-end="28914" vertical-scroll-proportion="0.33333334" vertical-offset="11501" max-vertical-offset="12461" /> <state line="700" column="20" selection-start="28914" selection-end="28914" vertical-scroll-proportion="0.33333334" vertical-offset="11501" max-vertical-offset="12461" />
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/widgets/views/progDescription.php">
<provider selected="true" editor-type-id="text-editor">
<state line="13" column="75" selection-start="244" selection-end="310" vertical-scroll-proportion="-8.5" vertical-offset="0" max-vertical-offset="357" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/ProgramHelper.php">
<provider selected="true" editor-type-id="text-editor">
<state line="142" column="54" selection-start="2992" selection-end="3027" vertical-scroll-proportion="0.332211" vertical-offset="2118" max-vertical-offset="3009" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/models/Program.php"> <entry file="file://$PROJECT_DIR$/www/protected/models/Program.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="250" column="71" selection-start="7268" selection-end="7268" vertical-scroll-proportion="0.93280184" vertical-offset="3431" max-vertical-offset="4403"> <state line="250" column="71" selection-start="7268" selection-end="7268" vertical-scroll-proportion="0.93280184" vertical-offset="3431" max-vertical-offset="4403">
@ -1023,6 +1029,34 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/www/protected/config/main.php">
<provider selected="true" editor-type-id="text-editor">
<state line="23" column="20" selection-start="557" selection-end="559" vertical-scroll-proportion="-11.115385" vertical-offset="102" max-vertical-offset="2125">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/SeededRandom.php">
<provider selected="true" editor-type-id="text-editor">
<state line="40" column="5" selection-start="679" selection-end="679" vertical-scroll-proportion="0.67080045" vertical-offset="0" max-vertical-offset="887">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/MsHtml.php">
<provider selected="true" editor-type-id="text-editor">
<state line="7" column="29" selection-start="156" selection-end="156" vertical-scroll-proportion="0.13416009" vertical-offset="0" max-vertical-offset="1326">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/parsedown/ParsedownExtra.php">
<provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-2.7598648" vertical-offset="2448" max-vertical-offset="6222">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/controllers/ProgramsController.php"> <entry file="file://$PROJECT_DIR$/www/protected/controllers/ProgramsController.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="22" column="42" selection-start="392" selection-end="392" vertical-scroll-proportion="0.09582864" vertical-offset="289" max-vertical-offset="4420"> <state line="22" column="42" selection-start="392" selection-end="392" vertical-scroll-proportion="0.09582864" vertical-offset="289" max-vertical-offset="4420">
@ -1030,6 +1064,69 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/widgets/ProgDescription.php">
<provider selected="true" editor-type-id="text-editor">
<state line="21" column="49" selection-start="399" selection-end="399" vertical-scroll-proportion="-13.730769" vertical-offset="0" max-vertical-offset="612">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/widgets/views/progDescription_tabbed.php">
<provider selected="true" editor-type-id="text-editor">
<state line="7" column="12" selection-start="113" selection-end="113" vertical-scroll-proportion="0.13416009" vertical-offset="0" max-vertical-offset="887">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/programs/view.php">
<provider selected="true" editor-type-id="text-editor">
<state line="93" column="63" selection-start="2699" selection-end="2699" vertical-scroll-proportion="-32.384617" vertical-offset="739" max-vertical-offset="2601">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/widgets/views/progDescription.php">
<provider selected="true" editor-type-id="text-editor">
<state line="13" column="36" selection-start="271" selection-end="271" vertical-scroll-proportion="-8.5" vertical-offset="0" max-vertical-offset="357">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/ProgramHelper.php">
<provider selected="true" editor-type-id="text-editor">
<state line="123" column="16" selection-start="2691" selection-end="2691" vertical-scroll-proportion="-18.653847" vertical-offset="1606" max-vertical-offset="2975">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/widgets/views/expandedLogHeader.php">
<provider selected="true" editor-type-id="text-editor">
<state line="19" column="60" selection-start="477" selection-end="477" vertical-scroll-proportion="-12.423077" vertical-offset="0" max-vertical-offset="527">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/log/_ajaxMarkdownPreview.php">
<provider selected="true" editor-type-id="text-editor">
<state line="2" column="24" selection-start="31" selection-end="31" vertical-scroll-proportion="-1.3076923" vertical-offset="0" max-vertical-offset="136">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/layouts/main.php">
<provider selected="true" editor-type-id="text-editor">
<state line="23" column="59" selection-start="813" selection-end="813" vertical-scroll-proportion="-15.038462" vertical-offset="0" max-vertical-offset="2006">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/parsedown/ParsedownHelper.php">
<provider selected="true" editor-type-id="text-editor">
<state line="16" column="1" selection-start="243" selection-end="243" vertical-scroll-proportion="0.44663382" vertical-offset="0" max-vertical-offset="609">
<folding />
</state>
</provider>
</entry>
</component> </component>
<component name="masterDetails"> <component name="masterDetails">
<states> <states>

130
www/css/prism.css Normal file
View File

@ -0,0 +1,130 @@
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+java+php+php-extras+bash+c+cpp+python+sql+ruby+csharp */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', monospace;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.builtin {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
color: #a67f59;
/*background: hsla(0,0%,100%,.5);*/
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function {
color: #DD4A68;
}
.token.regex,
.token.important {
color: #e90;
}
.token.important {
font-weight: bold;
}
.token.entity {
cursor: help;
}

View File

@ -364,6 +364,10 @@ ul.nav li.dropdown-append:hover > ul.dropdown-menu {
border-top: 2px solid #dddddd border-top: 2px solid #dddddd
} }
.markdownOwner code {
color: #495151;
}
/* ExpandedLogHeader /* ExpandedLogHeader
-------------------------------------------------- */ -------------------------------------------------- */

View File

@ -1,8 +1,8 @@
SuperBitBros is a clone of the original Super Mario for the NES. SuperBitBros is a clone of the original Super Mario for the NES.
I took the time and converted all of teh original levels into my own levelformat that i use for SuperBitBros. So you can play all the old levels with a little tweak: I took the time and converted all of the original levels into my own level format that I use for SuperBitBros. So you can play all the old levels with a little tweak:
When you die, and you have no lifes left, you have to start over. When you die, and you have no lifes left, you have to start over.
So you could argue that this is essentially a rogue-like super mario. Most of the things remained unchanged but i tweaked the amount of coins you get so its not totally impossible to beat the whole game. So you could argue that this is essentially a rogue-like Super-Mario. Most of the things remained unchanged but I tweaked the amount of coins you get so its not totally impossible to beat the whole game.
Also i added 3 different skins, mainly because I'm totally untalented with graphics and my first two attempts didn't pleased me :). Also I added 3 different skins, mainly because I'm totally untalented with graphics and my first two attempts didn't pleased me :).
If you want you can create your own levels, every level is just a simple .ora image - there currently no way to load custom levels, but it should be fairly easy to recompile the program. If you want you can create your own levels, every level is just a simple .ora image - there currently no way to load custom levels, but it should be fairly easy to recompile the program.

33
www/javascript/prism.js Normal file
View File

@ -0,0 +1,33 @@
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+java+php+php-extras+bash+c+cpp+python+sql+ruby+csharp&plugins=show-language */
var self=typeof window!="undefined"?window:{},Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content)):t.util.type(e)==="Array"?e.map(t.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.util.clone(e[i]));return r;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var r=t.util.clone(t.languages[e]);for(var i in n)r[i]=n[i];return r},insertBefore:function(e,n,r,i){i=i||t.languages;var s=i[e],o={};for(var u in s)if(s.hasOwnProperty(u)){if(u==n)for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);o[u]=s[u]}return i[e]=o},DFS:function(e,n){for(var r in e){n.call(e,r,e[r]);t.util.type(e)==="Object"&&t.languages.DFS(e[r],n)}}},highlightAll:function(e,n){var r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');for(var i=0,s;s=r[i++];)t.highlightElement(s,e===!0,n)},highlightElement:function(r,i,s){var o,u,a=r;while(a&&!e.test(a.className))a=a.parentNode;if(a){o=(a.className.match(e)||[,""])[1];u=t.languages[o]}if(!u)return;r.className=r.className.replace(e,"").replace(/\s+/g," ")+" language-"+o;a=r.parentNode;/pre/i.test(a.nodeName)&&(a.className=a.className.replace(e,"").replace(/\s+/g," ")+" language-"+o);var f=r.textContent;if(!f)return;var l={element:r,language:o,grammar:u,code:f};t.hooks.run("before-highlight",l);if(i&&self.Worker){var c=new Worker(t.filename);c.onmessage=function(e){l.highlightedCode=n.stringify(JSON.parse(e.data),o);t.hooks.run("before-insert",l);l.element.innerHTML=l.highlightedCode;s&&s.call(l.element);t.hooks.run("after-highlight",l)};c.postMessage(JSON.stringify({language:l.language,code:l.code}))}else{l.highlightedCode=t.highlight(l.code,l.grammar,l.language);t.hooks.run("before-insert",l);l.element.innerHTML=l.highlightedCode;s&&s.call(r);t.hooks.run("after-highlight",l)}},highlight:function(e,r,i){var s=t.tokenize(e,r);return n.stringify(t.util.encode(s),i)},tokenize:function(e,n,r){var i=t.Token,s=[e],o=n.rest;if(o){for(var u in o)n[u]=o[u];delete n.rest}e:for(var u in n){if(!n.hasOwnProperty(u)||!n[u])continue;var a=n[u],f=a.inside,l=!!a.lookbehind,c=0;a=a.pattern||a;for(var h=0;h<s.length;h++){var p=s[h];if(s.length>e.length)break e;if(p instanceof i)continue;a.lastIndex=0;var d=a.exec(p);if(d){l&&(c=d[1].length);var v=d.index-1+c,d=d[0].slice(c),m=d.length,g=v+m,y=p.slice(0,v+1),b=p.slice(g+1),w=[h,1];y&&w.push(y);var E=new i(u,f?t.tokenize(d,f):d);w.push(E);b&&w.push(b);Array.prototype.splice.apply(s,w)}}}return s},hooks:{all:{},add:function(e,n){var r=t.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.hooks.all[e];if(!r||!r.length)return;for(var i=0,s;s=r[i++];)s(n)}}},n=t.Token=function(e,t){this.type=e;this.content=t};n.stringify=function(e,r,i){if(typeof e=="string")return e;if(Object.prototype.toString.call(e)=="[object Array]")return e.map(function(t){return n.stringify(t,r,e)}).join("");var s={type:e.type,content:n.stringify(e.content,r,i),tag:"span",classes:["token",e.type],attributes:{},language:r,parent:i};s.type=="comment"&&(s.attributes.spellcheck="true");t.hooks.run("wrap",s);var o="";for(var u in s.attributes)o+=u+'="'+(s.attributes[u]||"")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'" '+o+">"+s.content+"</"+s.tag+">"};if(!self.document){if(!self.addEventListener)return self.Prism;self.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,i=n.code;self.postMessage(JSON.stringify(t.tokenize(i,t.languages[r])));self.close()},!1);return self.Prism}var r=document.getElementsByTagName("script");r=r[r.length-1];if(r){t.filename=r.src;document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)}return self.Prism}();typeof module!="undefined"&&module.exports&&(module.exports=Prism);;
Prism.languages.markup={comment:/<!--[\w\W]*?-->/g,prolog:/<\?.+?\?>/,doctype:/<!DOCTYPE.+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/\&#?[\da-z]{1,8};/gi};Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))});;
Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/ig,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,punctuation:/[\{\};:]/g,"function":/[-a-z0-9]+(?=\()/ig};Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{style:{pattern:/<style[\w\W]*?>[\w\W]*?<\/style>/ig,inside:{tag:{pattern:/<style[\w\W]*?>|<\/style>/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.css}}});;
Prism.languages.clike={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|(^|[^:])\/\/.*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,"class-name":{pattern:/((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/ig,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,"function":{pattern:/[a-z0-9_]+\(/ig,inside:{punctuation:/\(/}},number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|!|<=?|>=?|={1,3}|&{1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};;
Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|get|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g});Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}});Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/<script[\w\W]*?>[\w\W]*?<\/script>/ig,inside:{tag:{pattern:/<script[\w\W]*?>|<\/script>/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.javascript}}});;
Prism.languages.java=Prism.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/g,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+[e]?[\d]*[df]\b|\W\d*\.?\d+\b/gi,operator:{pattern:/([^\.]|^)([-+]{1,2}|!|=?<|=?>|={1,2}|(&){1,2}|\|?\||\?|\*|\/|%|\^|(<){2}|(>){2,3}|:|~)/g,lookbehind:!0}});;
/**
* Original by Aaron Harun: http://aahacreative.com/2012/07/31/php-syntax-highlighting-prism/
* Modified by Miles Johnson: http://milesj.me
*
* Supports the following:
* - Extends clike syntax
* - Support for PHP 5.3+ (namespaces, traits, generators, etc)
* - Smarter constant and function matching
*
* Adds the following new token classes:
* constant, delimiter, variable, function, package
*/Prism.languages.php=Prism.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/ig,constant:/\b[A-Z0-9_]{2,}\b/g,comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|(^|[^:])(\/\/|#).*?(\r?\n|$))/g,lookbehind:!0}});Prism.languages.insertBefore("php","keyword",{delimiter:/(\?>|<\?php|<\?)/ig,variable:/(\$\w+)\b/ig,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/g,lookbehind:!0,inside:{punctuation:/\\/}}});Prism.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/g,lookbehind:!0}});if(Prism.languages.markup){Prism.hooks.add("before-highlight",function(e){if(e.language!=="php")return;e.tokenStack=[];e.code=e.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/ig,function(t){e.tokenStack.push(t);return"{{{PHP"+e.tokenStack.length+"}}}"})});Prism.hooks.add("after-highlight",function(e){if(e.language!=="php")return;for(var t=0,n;n=e.tokenStack[t];t++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(t+1)+"}}}",Prism.highlight(n,e.grammar,"php"));e.element.innerHTML=e.highlightedCode});Prism.hooks.add("wrap",function(e){e.language==="php"&&e.type==="markup"&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'<span class="token php">$1</span>'))});Prism.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/g,inside:Prism.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/g})};;
Prism.languages.insertBefore("php","variable",{"this":/\$this/g,global:/\$_?(GLOBALS|SERVER|GET|POST|FILES|REQUEST|SESSION|ENV|COOKIE|HTTP_RAW_POST_DATA|argc|argv|php_errormsg|http_response_header)/g,scope:{pattern:/\b[\w\\]+::/g,inside:{keyword:/(static|self|parent)/,punctuation:/(::|\\)/}}});;
Prism.languages.bash=Prism.languages.extend("clike",{comment:{pattern:/(^|[^"{\\])(#.*?(\r?\n|$))/g,lookbehind:!0},string:{pattern:/("|')(\\?[\s\S])*?\1/g,inside:{property:/\$([a-zA-Z0-9_#\?\-\*!@]+|\{[^\}]+\})/g}},keyword:/\b(if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)\b/g});Prism.languages.insertBefore("bash","keyword",{property:/\$([a-zA-Z0-9_#\?\-\*!@]+|\{[^}]+\})/g});Prism.languages.insertBefore("bash","comment",{important:/(^#!\s*\/bin\/bash)|(^#!\s*\/bin\/sh)/g});;
Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/g,operator:/[-+]{1,2}|!=?|&lt;{1,2}=?|&gt;{1,2}=?|\-&gt;|={1,2}|\^|~|%|(&amp;){1,2}|\|?\||\?|\*|\//g});Prism.languages.insertBefore("c","keyword",{property:{pattern:/#[a-zA-Z]+\ .*/g,inside:{property:/&lt;[a-zA-Z.]+>/g}}});;
Prism.languages.cpp=Prism.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|delete\[\]|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|new\[\]|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/g,operator:/[-+]{1,2}|!=?|&lt;{1,2}=?|&gt;{1,2}=?|\-&gt;|:{1,2}|={1,2}|\^|~|%|(&amp;){1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/g});;
Prism.languages.python={comment:{pattern:/(^|[^\\])#.*?(\r?\n|$)/g,lookbehind:!0},string:/"""[\s\S]+?"""|("|')(\\?.)*?\1/g,keyword:/\b(as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/g,"boolean":/\b(True|False)\b/g,number:/\b-?(0x)?\d*\.?[\da-f]+\b/g,operator:/[-+]{1,2}|=?&lt;|=?&gt;|!|={1,2}|(&){1,2}|(&amp;){1,2}|\|?\||\?|\*|\/|~|\^|%|\b(or|and|not)\b/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};;
Prism.languages.sql={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|((--)|(\/\/)|#).*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?[\s\S])*?\1/g,keyword:/\b(ACTION|ADD|AFTER|ALGORITHM|ALTER|ANALYZE|APPLY|AS|ASC|AUTHORIZATION|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADE|CASCADED|CASE|CHAIN|CHAR VARYING|CHARACTER VARYING|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLUMN|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATA|DATABASE|DATABASES|DATETIME|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DOUBLE PRECISION|DROP|DUMMY|DUMP|DUMPFILE|DUPLICATE KEY|ELSE|ENABLE|ENCLOSED BY|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPE|ESCAPED BY|EXCEPT|EXEC|EXECUTE|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR|FOR EACH ROW|FORCE|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GEOMETRY|GEOMETRYCOLLECTION|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|IDENTITY|IDENTITY_INSERT|IDENTITYCOL|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTO|INVOKER|ISOLATION LEVEL|JOIN|KEY|KEYS|KILL|LANGUAGE SQL|LAST|LEFT|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONGBLOB|LONGTEXT|MATCH|MATCHED|MEDIUMBLOB|MEDIUMINT|MEDIUMTEXT|MERGE|MIDDLEINT|MODIFIES SQL DATA|MODIFY|MULTILINESTRING|MULTIPOINT|MULTIPOLYGON|NATIONAL|NATIONAL CHAR VARYING|NATIONAL CHARACTER|NATIONAL CHARACTER VARYING|NATIONAL VARCHAR|NATURAL|NCHAR|NCHAR VARCHAR|NEXT|NO|NO SQL|NOCHECK|NOCYCLE|NONCLUSTERED|NULLIF|NUMERIC|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPTIMIZE|OPTION|OPTIONALLY|ORDER|OUT|OUTER|OUTFILE|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREV|PRIMARY|PRINT|PRIVILEGES|PROC|PROCEDURE|PUBLIC|PURGE|QUICK|RAISERROR|READ|READS SQL DATA|READTEXT|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEATABLE|REPLICATION|REQUIRE|RESTORE|RESTRICT|RETURN|RETURNS|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROWCOUNT|ROWGUIDCOL|ROWS?|RTREE|RULE|SAVE|SAVEPOINT|SCHEMA|SELECT|SERIAL|SERIALIZABLE|SESSION|SESSION_USER|SET|SETUSER|SHARE MODE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|START|STARTING BY|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLE|TABLES|TABLESPACE|TEMPORARY|TEMPTABLE|TERMINATED BY|TEXT|TEXTSIZE|THEN|TIMESTAMP|TINYBLOB|TINYINT|TINYTEXT|TO|TOP|TRAN|TRANSACTION|TRANSACTIONS|TRIGGER|TRUNCATE|TSEQUAL|TYPE|TYPES|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNPIVOT|UPDATE|UPDATETEXT|USAGE|USE|USER|USING|VALUE|VALUES|VARBINARY|VARCHAR|VARCHARACTER|VARYING|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH|WITH ROLLUP|WITHIN|WORK|WRITE|WRITETEXT)\b/gi,"boolean":/\b(TRUE|FALSE|NULL)\b/gi,number:/\b-?(0x)?\d*\.?[\da-f]+\b/g,operator:/\b(ALL|AND|ANY|BETWEEN|EXISTS|IN|LIKE|NOT|OR|IS|UNIQUE|CHARACTER SET|COLLATE|DIV|OFFSET|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b|[-+]{1}|!|=?&lt;|=?&gt;|={1}|(&amp;){1,2}|\|?\||\?|\*|\//gi,ignore:/&(lt|gt|amp);/gi,punctuation:/[;[\]()`,.]/g};;
/**
* Original by Samuel Flores
*
* Adds the following new token classes:
* constant, builtin, variable, symbol, regex
*/Prism.languages.ruby=Prism.languages.extend("clike",{comment:/#[^\r\n]*(\r?\n|$)/g,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/g,builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*[?!]?\b/g});Prism.languages.insertBefore("ruby","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0},variable:/[@$]+\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g,symbol:/:\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g});;
Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(abstract|as|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/g,string:/@?("|')(\\?.)*?\1/g,preprocessor:/^\s*#.*/gm,number:/\b-?(0x)?\d*\.?\d+\b/g});;
(function(){if(!self.Prism){return}var e={csharp:"C#",cpp:"C++"};Prism.hooks.add("before-highlight",function(t){var n=e[t.language]||t.language;t.element.setAttribute("data-language",n)})})();

View File

@ -136,12 +136,10 @@ class ProgramHelper {
public static function getDescriptionMarkdownTab($path) public static function getDescriptionMarkdownTab($path)
{ {
$md = new CMarkdown;
$content = file_get_contents($path); $content = file_get_contents($path);
$result = '<div class="markdownOwner"><div><p>'; $result = '<div class="markdownOwner"><div><p>';
$result .= $md->transform($content); $result .= ParsedownHelper::parse($content);
$result .= '</p></div></div>'; $result .= '</p></div></div>';
return $result; return $result;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,371 @@
<?php
#
#
# Parsedown Extra
# https://github.com/erusev/parsedown-extra
#
# (c) Emanuil Rusev
# http://erusev.com
#
# For the full license information, view the LICENSE file that was distributed
# with this source code.
#
#
class ParsedownExtra extends Parsedown
{
#
# ~
function __construct()
{
$this->BlockTypes[':'] []= 'DefinitionList';
$this->DefinitionTypes['*'] []= 'Abbreviation';
# identify footnote definitions before reference definitions
array_unshift($this->DefinitionTypes['['], 'Footnote');
# identify footnote markers before before links
array_unshift($this->SpanTypes['['], 'FootnoteMarker');
}
#
# ~
function text($text)
{
$markup = parent::text($text);
# merge consecutive dl elements
$markup = preg_replace('/<\/dl>\s+<dl>\s+/', '', $markup);
# add footnotes
if (isset($this->Definitions['Footnote']))
{
$Element = $this->buildFootnoteElement();
$markup .= "\n" . $this->element($Element);
}
return $markup;
}
#
# Blocks
#
#
# Atx
protected function identifyAtx($Line)
{
$Block = parent::identifyAtx($Line);
if (preg_match('/[ ]*'.$this->attributesPattern.'[ ]*$/', $Block['element']['text'], $matches, PREG_OFFSET_CAPTURE))
{
$attributeString = $matches[1][0];
$Block['element']['attributes'] = $this->parseAttributes($attributeString);
$Block['element']['text'] = substr($Block['element']['text'], 0, $matches[0][1]);
}
return $Block;
}
#
# Definition List
protected function identifyDefinitionList($Line, $Block)
{
if (isset($Block['type']))
{
return;
}
$Element = array(
'name' => 'dl',
'handler' => 'elements',
'text' => array(),
);
$terms = explode("\n", $Block['element']['text']);
foreach ($terms as $term)
{
$Element['text'] []= array(
'name' => 'dt',
'handler' => 'line',
'text' => $term,
);
}
$Element['text'] []= array(
'name' => 'dd',
'handler' => 'line',
'text' => ltrim($Line['text'], ' :'),
);
$Block['element'] = $Element;
return $Block;
}
protected function addToDefinitionList($Line, array $Block)
{
if ($Line['text'][0] === ':')
{
$Block['element']['text'] []= array(
'name' => 'dd',
'handler' => 'line',
'text' => ltrim($Line['text'], ' :'),
);
return $Block;
}
if ( ! isset($Block['interrupted']))
{
$Element = array_pop($Block['element']['text']);
$Element['text'] .= "\n" . chop($Line['text']);
$Block['element']['text'] []= $Element;
return $Block;
}
}
#
# Setext
protected function identifySetext($Line, array $Block = null)
{
$Block = parent::identifySetext($Line, $Block);
if (preg_match('/[ ]*'.$this->attributesPattern.'[ ]*$/', $Block['element']['text'], $matches, PREG_OFFSET_CAPTURE))
{
$attributeString = $matches[1][0];
$Block['element']['attributes'] = $this->parseAttributes($attributeString);
$Block['element']['text'] = substr($Block['element']['text'], 0, $matches[0][1]);
}
return $Block;
}
#
# Definitions
#
#
# Abbreviation
protected function identifyAbbreviation($Line)
{
if (preg_match('/^\*\[(.+?)\]:[ ]*(.+?)[ ]*$/', $Line['text'], $matches))
{
$Abbreviation = array(
'id' => $matches[1],
'data' => $matches[2],
);
return $Abbreviation;
}
}
#
# Footnote
protected function identifyFootnote($Line)
{
if (preg_match('/^\[\^(.+?)\]:[ ]?(.+)$/', $Line['text'], $matches))
{
$Footnote = array(
'id' => $matches[1],
'data' => array(
'text' => $matches[2],
'count' => null,
'number' => null,
),
);
return $Footnote;
}
}
#
# Spans
#
#
# Footnote Marker
protected function identifyFootnoteMarker($Excerpt)
{
if (preg_match('/^\[\^(.+?)\]/', $Excerpt['text'], $matches))
{
$name = $matches[1];
if ( ! isset($this->Definitions['Footnote'][$name]))
{
return;
}
$this->Definitions['Footnote'][$name]['count'] ++;
if ( ! isset($this->Definitions['Footnote'][$name]['number']))
{
$this->Definitions['Footnote'][$name]['number'] = ++ $this->footnoteCount; # » &
}
$Element = array(
'name' => 'sup',
'attributes' => array('id' => 'fnref'.$this->Definitions['Footnote'][$name]['count'].':'.$name),
'handler' => 'element',
'text' => array(
'name' => 'a',
'attributes' => array('href' => '#fn:'.$name, 'class' => 'footnote-ref'),
'text' => $this->Definitions['Footnote'][$name]['number'],
),
);
return array(
'extent' => strlen($matches[0]),
'element' => $Element,
);
}
}
private $footnoteCount = 0;
#
# Link
protected function identifyLink($Excerpt)
{
$Span = parent::identifyLink($Excerpt);
$remainder = substr($Excerpt['text'], $Span['extent']);
if (preg_match('/^[ ]*'.$this->attributesPattern.'/', $remainder, $matches))
{
$Span['element']['attributes'] += $this->parseAttributes($matches[1]);
$Span['extent'] += strlen($matches[0]);
}
return $Span;
}
#
# ~
protected function readPlainText($text)
{
$text = parent::readPlainText($text);
if (isset($this->Definitions['Abbreviation']))
{
foreach ($this->Definitions['Abbreviation'] as $abbreviation => $phrase)
{
$text = str_replace($abbreviation, '<abbr title="'.$phrase.'">'.$abbreviation.'</abbr>', $text);
}
}
return $text;
}
#
# ~
#
protected function buildFootnoteElement()
{
$Element = array(
'name' => 'div',
'attributes' => array('class' => 'footnotes'),
'handler' => 'elements',
'text' => array(
array(
'name' => 'hr',
),
array(
'name' => 'ol',
'handler' => 'elements',
'text' => array(),
),
),
);
usort($this->Definitions['Footnote'], function($A, $B) {
return $A['number'] - $B['number'];
});
foreach ($this->Definitions['Footnote'] as $name => $Data)
{
if ( ! isset($Data['number']))
{
continue;
}
$text = $Data['text'];
foreach (range(1, $Data['count']) as $number)
{
$text .= '&#160;<a href="#fnref'.$number.':'.$name.'" rev="footnote" class="footnote-backref">&#8617;</a>';
}
$Element['text'][1]['text'] []= array(
'name' => 'li',
'attributes' => array('id' => 'fn:'.$name),
'handler' => 'elements',
'text' => array(
array(
'name' => 'p',
'text' => $text,
),
),
);
}
return $Element;
}
#
# Private
#
private function parseAttributes($attributeString)
{
$Data = array();
$attributes = preg_split('/[ ]+/', $attributeString, - 1, PREG_SPLIT_NO_EMPTY);
foreach ($attributes as $attribute)
{
if ($attribute[0] === '#')
{
$Data['id'] = substr($attribute, 1);
}
else # "."
{
$classes []= substr($attribute, 1);
}
}
if (isset($classes))
{
$Data['class'] = implode(' ', $classes);
}
return $Data;
}
private $attributesPattern = '{((?:[#.][-\w]+[ ]*)+)}';
}

View File

@ -0,0 +1,17 @@
<?php
/**
* Class ParsedownHelper
*/
class ParsedownHelper {
/**
* @param string $raw_text
* @return string
*/
public static function parse($raw_text)
{
$Instance = new ParsedownExtra();
return $Instance->text($raw_text);
}
}

View File

@ -17,11 +17,7 @@
<p> <p>
<?php <?php
$this->beginWidget('CMarkdown'); echo ParsedownHelper::parse($this->content);
echo $this->content;
$this->endWidget();
?> ?>
</p> </p>

View File

@ -33,6 +33,7 @@ return ArrayX::merge(
'application.components.*', 'application.components.*',
'application.components.widgets.*', 'application.components.widgets.*',
'application.components.extendedGitGraph.*', 'application.components.extendedGitGraph.*',
'application.components.parsedown.*',
'bootstrap.components.*', 'bootstrap.components.*',
'bootstrap.behaviors.*', 'bootstrap.behaviors.*',
'bootstrap.helpers.*', 'bootstrap.helpers.*',

View File

@ -21,6 +21,7 @@
<?php Yii::app()->bootstrap->register(); ?> <?php Yii::app()->bootstrap->register(); ?>
<link rel="stylesheet" type="text/css" href="/css/styles.css"/> <link rel="stylesheet" type="text/css" href="/css/styles.css"/>
<link rel="stylesheet" type="text/css" href="/css/prism.css"/>
<title><?php echo CHtml::encode($this->pageTitle); ?></title> <title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head> </head>
@ -98,6 +99,7 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="/javascript/scripts.js"></script> <script src="/javascript/scripts.js"></script>
<script src="/javascript/prism.js"></script>
<?php <?php
foreach ($this->js_scripts as $script) { foreach ($this->js_scripts as $script) {

View File

@ -1,7 +1,3 @@
<?php <?php
$this->beginWidget('CMarkdown', array('purifyOutput'=>true)); echo ParsedownHelper::parse($content);
echo $content;
$this->endWidget();

View File

@ -36,7 +36,7 @@ $this->selectedNav = 'about';
<div class="gitbox-footer"> <div class="gitbox-footer">
<div class="gitbox-footer-box"> <div class="gitbox-footer-box">
<span class="gitbox-footer-box-header">Last Update</span> <span class="gitbox-footer-box-header">Last Update</span>
<span class="gitbox-footer-box-number"><?php echo $egh['creation']->diff(new DateTime())->format('%d') + 1; ?> day<?php echo (($egh['creation']->diff(new DateTime())->format('d') == 1) ? '' : 's')?> ago</span> <span class="gitbox-footer-box-number"><?php echo $egh['creation']->diff(new DateTime())->format('%d') + 1; ?> day<?php echo (($egh['creation']->diff(new DateTime())->format('%d') == 0) ? '' : 's')?> ago</span>
<span class="gitbox-footer-box-footer"><?php echo $egh['creation']->format('M d Y'); ?></span> <span class="gitbox-footer-box-footer"><?php echo $egh['creation']->format('M d Y'); ?></span>
</div> </div>