mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 00:36:14 +02:00
Drop deprecated Redcarpet based Markdown formatter (#40149).
Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23153 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
5
Gemfile
5
Gemfile
@@ -44,11 +44,6 @@ group :minimagick do
|
||||
gem 'mini_magick', '~> 5.0.1'
|
||||
end
|
||||
|
||||
# Optional Markdown support
|
||||
group :markdown do
|
||||
gem 'redcarpet', '~> 3.6.0'
|
||||
end
|
||||
|
||||
# Optional CommonMark support, not for JRuby
|
||||
group :common_mark do
|
||||
gem "commonmarker", '~> 0.23.8'
|
||||
|
||||
@@ -1,230 +0,0 @@
|
||||
/**
|
||||
* This file is part of DotClear.
|
||||
* Copyright (c) 2005 Nicolas Martin & Olivier Meunier and contributors. All rights reserved.
|
||||
* This code is released under the GNU General Public License.
|
||||
*
|
||||
* Modified by JP LANG for markdown formatting
|
||||
*/
|
||||
|
||||
// strong
|
||||
jsToolBar.prototype.elements.strong = {
|
||||
type: 'button',
|
||||
title: 'Strong',
|
||||
shortcut: 'b',
|
||||
fn: {
|
||||
wiki: function() { this.singleTag('**') }
|
||||
}
|
||||
}
|
||||
|
||||
// em
|
||||
jsToolBar.prototype.elements.em = {
|
||||
type: 'button',
|
||||
title: 'Italic',
|
||||
shortcut: 'i',
|
||||
fn: {
|
||||
wiki: function() { this.singleTag("*") }
|
||||
}
|
||||
}
|
||||
|
||||
// ins
|
||||
jsToolBar.prototype.elements.ins = {
|
||||
type: 'button',
|
||||
title: 'Underline',
|
||||
shortcut: 'u',
|
||||
fn: {
|
||||
wiki: function() { this.singleTag('_') }
|
||||
}
|
||||
}
|
||||
|
||||
// del
|
||||
jsToolBar.prototype.elements.del = {
|
||||
type: 'button',
|
||||
title: 'Deleted',
|
||||
fn: {
|
||||
wiki: function() { this.singleTag('~~') }
|
||||
}
|
||||
}
|
||||
|
||||
// code
|
||||
jsToolBar.prototype.elements.code = {
|
||||
type: 'button',
|
||||
title: 'Code',
|
||||
fn: {
|
||||
wiki: function() { this.singleTag('`') }
|
||||
}
|
||||
}
|
||||
|
||||
// spacer
|
||||
jsToolBar.prototype.elements.space1 = {type: 'space'}
|
||||
|
||||
// headings
|
||||
jsToolBar.prototype.elements.h1 = {
|
||||
type: 'button',
|
||||
title: 'Heading 1',
|
||||
fn: {
|
||||
wiki: function() {
|
||||
this.encloseLineSelection('# ', '',function(str) {
|
||||
str = str.replace(/^#+\s+/, '')
|
||||
return str;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
jsToolBar.prototype.elements.h2 = {
|
||||
type: 'button',
|
||||
title: 'Heading 2',
|
||||
fn: {
|
||||
wiki: function() {
|
||||
this.encloseLineSelection('## ', '',function(str) {
|
||||
str = str.replace(/^#+\s+/, '')
|
||||
return str;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
jsToolBar.prototype.elements.h3 = {
|
||||
type: 'button',
|
||||
title: 'Heading 3',
|
||||
fn: {
|
||||
wiki: function() {
|
||||
this.encloseLineSelection('### ', '',function(str) {
|
||||
str = str.replace(/^#+\s+/, '')
|
||||
return str;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// spacer
|
||||
jsToolBar.prototype.elements.space2 = {type: 'space'}
|
||||
|
||||
// ul
|
||||
jsToolBar.prototype.elements.ul = {
|
||||
type: 'button',
|
||||
title: 'Unordered list',
|
||||
fn: {
|
||||
wiki: function() {
|
||||
this.encloseLineSelection('','',function(str) {
|
||||
str = str.replace(/\r/g,'');
|
||||
return str.replace(/(\n|^)[#-]?\s*/g,"$1* ");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ol
|
||||
jsToolBar.prototype.elements.ol = {
|
||||
type: 'button',
|
||||
title: 'Ordered list',
|
||||
fn: {
|
||||
wiki: function() {
|
||||
this.encloseLineSelection('','',function(str) {
|
||||
str = str.replace(/\r/g,'');
|
||||
return str.replace(/(\n|^)[*-]?\s*/g,"$11. ");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// spacer
|
||||
jsToolBar.prototype.elements.space3 = {type: 'space'}
|
||||
|
||||
// bq
|
||||
jsToolBar.prototype.elements.bq = {
|
||||
type: 'button',
|
||||
title: 'Quote',
|
||||
fn: {
|
||||
wiki: function() {
|
||||
this.encloseLineSelection('','',function(str) {
|
||||
str = str.replace(/\r/g,'');
|
||||
return str.replace(/(\n|^)( *)([^\n]*)/g,"$1> $2$3");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// unbq
|
||||
jsToolBar.prototype.elements.unbq = {
|
||||
type: 'button',
|
||||
title: 'Unquote',
|
||||
fn: {
|
||||
wiki: function() {
|
||||
this.encloseLineSelection('','',function(str) {
|
||||
str = str.replace(/\r/g,'');
|
||||
return str.replace(/(\n|^) *(> ?)?( *)([^\n]*)/g,"$1$3$4");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// table
|
||||
jsToolBar.prototype.elements.table = {
|
||||
type: 'button',
|
||||
title: 'Table',
|
||||
fn: {
|
||||
wiki: function() {
|
||||
var This = this;
|
||||
this.tableMenu(function(cols, rowCount){
|
||||
This.encloseLineSelection(
|
||||
'|'+cols.join(' |')+' |\n' + // header
|
||||
Array(cols.length+1).join('|--')+'|\n' + // second line
|
||||
Array(rowCount+1).join(Array(cols.length+1).join('| ')+'|\n') // cells
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// pre
|
||||
jsToolBar.prototype.elements.pre = {
|
||||
type: 'button',
|
||||
title: 'Preformatted text',
|
||||
fn: {
|
||||
wiki: function() { this.encloseLineSelection('```\n', '\n```') }
|
||||
}
|
||||
}
|
||||
|
||||
// Code highlighting
|
||||
jsToolBar.prototype.elements.precode = {
|
||||
type: 'button',
|
||||
title: 'Highlighted code',
|
||||
fn: {
|
||||
wiki: function() {
|
||||
var This = this;
|
||||
this.precodeMenu(function(lang){
|
||||
This.encloseLineSelection('``` ' + lang + '\n', '\n```\n');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// spacer
|
||||
jsToolBar.prototype.elements.space4 = {type: 'space'}
|
||||
|
||||
// wiki page
|
||||
jsToolBar.prototype.elements.link = {
|
||||
type: 'button',
|
||||
title: 'Wiki link',
|
||||
fn: {
|
||||
wiki: function() { this.encloseSelection("[[", "]]") }
|
||||
}
|
||||
}
|
||||
// image
|
||||
jsToolBar.prototype.elements.img = {
|
||||
type: 'button',
|
||||
title: 'Image',
|
||||
fn: {
|
||||
wiki: function() { this.encloseSelection("") }
|
||||
}
|
||||
}
|
||||
|
||||
// spacer
|
||||
jsToolBar.prototype.elements.space5 = {type: 'space'}
|
||||
// help
|
||||
jsToolBar.prototype.elements.help = {
|
||||
type: 'button',
|
||||
title: 'Help',
|
||||
fn: {
|
||||
wiki: function() { window.open(this.help_link, '', 'resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes') }
|
||||
}
|
||||
}
|
||||
@@ -1930,16 +1930,6 @@ module ApplicationHelper
|
||||
)
|
||||
end
|
||||
|
||||
# Returns the markdown formatter: markdown or common_mark
|
||||
# ToDo: Remove this when markdown will be removed
|
||||
def markdown_formatter
|
||||
if Setting.text_formatting == "markdown"
|
||||
"markdown"
|
||||
else
|
||||
"common_mark"
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def wiki_helper
|
||||
|
||||
@@ -91,7 +91,7 @@ module AttachmentsHelper
|
||||
|
||||
def render_file_content(attachment, content)
|
||||
if attachment.is_markdown?
|
||||
render :partial => 'common/markup', :locals => {:markup_text_formatting => markdown_formatter, :markup_text => content}
|
||||
render :partial => 'common/markup', :locals => {:markup_text_formatting => 'common_mark', :markup_text => content}
|
||||
elsif attachment.is_textile?
|
||||
render :partial => 'common/markup', :locals => {:markup_text_formatting => 'textile', :markup_text => content}
|
||||
else
|
||||
|
||||
@@ -1,341 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki formatting (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine links</a></li>
|
||||
<li><a href='#4'>External links</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Text formatting</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Font style</a></li>
|
||||
<li><a href='#7'>Inline images</a></li>
|
||||
<li><a href='#8'>Headings</a></li>
|
||||
<li><a href='#10'>Blockquotes</a></li>
|
||||
<li><a href='#11'>Table of content</a></li>
|
||||
<li><a href='#14'>Horizontal Rule</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Macros</a></li>
|
||||
<li><a href='#13'>Code highlighting</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine links</h3>
|
||||
|
||||
<p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
|
||||
<ul>
|
||||
<li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>You can also link to pages of an other project wiki:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
|
||||
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>Links to other resources:</p>
|
||||
|
||||
<ul>
|
||||
<li>Documents:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (link to document with id 17)</li>
|
||||
<li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
|
||||
<li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Versions:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (link to version with id 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Attachments:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
|
||||
<li>For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Changesets:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (link to a changeset)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
|
||||
<li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
|
||||
<li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository files:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
|
||||
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
|
||||
<li><strong>export:some/file</strong> (force the download of the file)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forums:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (link to forum with id 1</li>
|
||||
<li><strong>forum:Support</strong> (link to forum named Support)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forum messages:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (link to message with id 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projects:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (link to project with id 3)</li>
|
||||
<li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
|
||||
<li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>News:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (link to news item with id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Escaping:</p>
|
||||
|
||||
<ul>
|
||||
<li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>External links</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>displays: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>If you want to display a specific text instead of the URL, you can use the standard markdown syntax:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>displays: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
|
||||
|
||||
|
||||
<p>For things such as headlines, bold, tables, lists, Redmine supports Markdown syntax. See <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Font style</h3>
|
||||
|
||||
<pre>
|
||||
* **bold**
|
||||
* *Italic*
|
||||
* ***bold italic***
|
||||
* _underline_
|
||||
* ~~strike-through~~
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>bold</strong></li>
|
||||
<li><em>italic</em></li>
|
||||
<li><em><strong>bold italic</strong></em></li>
|
||||
<li><u>underline</u></li>
|
||||
<li><del>strike-through</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> displays an image located at image_url (markdown syntax)</li>
|
||||
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong></strong></li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Headings</h3>
|
||||
|
||||
<pre>
|
||||
# Heading
|
||||
## Subheading
|
||||
### Subsubheading
|
||||
</pre>
|
||||
|
||||
<p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
|
||||
|
||||
<p>Start the paragraph with <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => left aligned toc
|
||||
{{>toc}} => right aligned toc
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Macros</h2>
|
||||
|
||||
<p>Redmine has the following builtin macros:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Sample macro.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Displays a list of all available macros, including description if available.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
|
||||
<pre><code>{{child_pages}} -- can be used from a wiki page only
|
||||
{{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Include a wiki page. Example:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>or to include a page of a specific project wiki:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Inserts of collapsed block of text. Example:</p>
|
||||
<pre><code>{{collapse(View details...)
|
||||
This is a block of text that is collapsed by default.
|
||||
It can be expanded by clicking a link.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki formatting</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Wiki Syntax Quick Reference (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Font Styles <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Strong" }) %></th><td style="width:50%;">**Strong**</td><td style="width:50%;"><strong>Strong</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Italic" }) %></th><td>*Italic*</td><td><em>Italic</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Underline" }) %></th><td>_Underline_</td><td><ins>Underline</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Deleted" }) %></th><td>~~Deleted~~</td><td><del>Deleted</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Inline code" }) %></th><td>`Inline Code`</td><td><code>Inline Code</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> lines<br /> of code<br />```</td><td>
|
||||
<pre>
|
||||
lines
|
||||
of code
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Highlighted code <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Вграден код" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Lists</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Unordered list" }) %></th><td>* Item 1<br /> * Sub<br />* Item 2</td><td><ul><li>Item 1<ul><li>Sub</li></ul></li><li>Item 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Ordered list" }) %></th><td>1. Item 1<br /> 1. Sub<br />2. Item 2</td><td><ol><li>Item 1<ol><li>Sub</li></ol></li><li>Item 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Headings <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># Title 1</td><td><h1>Title 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## Title 2</td><td><h2>Title 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### Title 3</td><td><h3>Title 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link to a Wiki page" }) %></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
|
||||
<tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Inline images <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tables</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">More Information</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,341 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki formatting (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine links</a></li>
|
||||
<li><a href='#4'>External links</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Text formatting</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Font style</a></li>
|
||||
<li><a href='#7'>Inline images</a></li>
|
||||
<li><a href='#8'>Headings</a></li>
|
||||
<li><a href='#10'>Blockquotes</a></li>
|
||||
<li><a href='#11'>Table of content</a></li>
|
||||
<li><a href='#14'>Horizontal Rule</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Macros</a></li>
|
||||
<li><a href='#13'>Code highlighting</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine links</h3>
|
||||
|
||||
<p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
|
||||
<ul>
|
||||
<li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>You can also link to pages of an other project wiki:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
|
||||
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>Links to other resources:</p>
|
||||
|
||||
<ul>
|
||||
<li>Documents:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (link to document with id 17)</li>
|
||||
<li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
|
||||
<li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Versions:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (link to version with id 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Attachments:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
|
||||
<li>For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Changesets:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (link to a changeset)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
|
||||
<li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
|
||||
<li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository files:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
|
||||
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
|
||||
<li><strong>export:some/file</strong> (force the download of the file)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forums:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (link to forum with id 1</li>
|
||||
<li><strong>forum:Support</strong> (link to forum named Support)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forum messages:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (link to message with id 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projects:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (link to project with id 3)</li>
|
||||
<li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
|
||||
<li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>News:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (link to news item with id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Escaping:</p>
|
||||
|
||||
<ul>
|
||||
<li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>External links</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>displays: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>If you want to display a specific text instead of the URL, you can use the standard markdown syntax:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>displays: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
|
||||
|
||||
|
||||
<p>For things such as headlines, bold, tables, lists, Redmine supports Markdown syntax. See <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Font style</h3>
|
||||
|
||||
<pre>
|
||||
* **bold**
|
||||
* *Italic*
|
||||
* ***bold italic***
|
||||
* _underline_
|
||||
* ~~strike-through~~
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>bold</strong></li>
|
||||
<li><em>italic</em></li>
|
||||
<li><em><strong>bold italic</strong></em></li>
|
||||
<li><u>underline</u></li>
|
||||
<li><del>strike-through</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> displays an image located at image_url (markdown syntax)</li>
|
||||
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong></strong></li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Headings</h3>
|
||||
|
||||
<pre>
|
||||
# Heading
|
||||
## Subheading
|
||||
### Subsubheading
|
||||
</pre>
|
||||
|
||||
<p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
|
||||
|
||||
<p>Start the paragraph with <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => left aligned toc
|
||||
{{>toc}} => right aligned toc
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Macros</h2>
|
||||
|
||||
<p>Redmine has the following builtin macros:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Sample macro.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Displays a list of all available macros, including description if available.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
|
||||
<pre><code>{{child_pages}} -- can be used from a wiki page only
|
||||
{{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Include a wiki page. Example:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>or to include a page of a specific project wiki:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Inserts of collapsed block of text. Example:</p>
|
||||
<pre><code>{{collapse(View details...)
|
||||
This is a block of text that is collapsed by default.
|
||||
It can be expanded by clicking a link.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Format de la Wiki</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Guia rapida de la Sintaxis de la Wiki (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Font Styles <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Negreta" }) %></th><td style="width:50%;">**Negreta**</td><td style="width:50%;"><strong>Negreta</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Cursiva" }) %></th><td>*Cursiva*</td><td><em>Cursiva</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Underline" }) %></th><td>_Underline_</td><td><ins>Underline</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Eliminat" }) %></th><td>~~Eliminat~~</td><td><del>Eliminat</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Codi en línia" }) %></th><td>`Codi en línia`</td><td><code>Codi en línia</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> linies<br /> de codi<br />```</td><td>
|
||||
<pre>
|
||||
linies
|
||||
de codi
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Highlighted code <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Highlighted code" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Llistes</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Llista desordenada" }) %></th><td>* Article 1<br /> * Sub<br />* Article 2</td><td><ul><li>Article 1<ul><li>Sub</li></ul></li><li>Article 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Llista Ordenada" }) %></th><td>1. Article 1<br /> 1. Sub<br />2. Article 2</td><td><ol><li>Article 1<ol><li>Sub</li></ol></li><li>Article 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Capçaleres <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Encapçament 1" }) %></th><td># Títol 1</td><td><h1>Títol 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Encapçament 2" }) %></th><td>## Títol 2</td><td><h2>Títol 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Encapçament 3" }) %></th><td>### Títol 3</td><td><h3>Títol 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link a la pagina Wiki" }) %></th><td>[[Pagina Wiki]]</td><td><a href="#">Pagina Wiki</a></td></tr>
|
||||
<tr><th></th><td>Assumpte #12</td><td>Assumpte <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>Revisió r43</td><td>Revisió <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Imatges <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Imatge" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Taules</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">Més informació</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,338 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>Formátování Wiki v Redminu</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Formátování Wiki (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Odkazy</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Odkazy Redmine</a></li>
|
||||
<li><a href='#4'>Externí odkazy</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Formátování textu</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Styly písma</a></li>
|
||||
<li><a href='#7'>Vložené obrázky</a></li>
|
||||
<li><a href='#8'>Nadpisy</a></li>
|
||||
<li><a href='#10'>Odstavce</a></li>
|
||||
<li><a href='#11'>Obsah</a></li>
|
||||
<li><a href='#14'>Vodorovná čára</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Macros</a></li>
|
||||
<li><a href='#13'>Zvýrazňování kódu</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Odkazy</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Odkazy Redmine</h3>
|
||||
|
||||
<p>Redmine umožňuje hypertextové odkazy mezi jednotlivými zdroji (úkoly, revize, wiki stránky...) kdekoli, kde je použito Wiki formátování.</p>
|
||||
<ul>
|
||||
<li>Odkaz na úkol: <strong>#124</strong> (zobrazí <del><a href="#" class="issue" title="Hromadná změna nezmění kategorii úkolů (Uzavřeno)">#124</a></del>, odkaz je přeškrtnutý, jestliže je úkol uzavřen)</li>
|
||||
<li>Odkaz na úkol včetně fronty a předmětu: <strong>##124</strong> (zobrazí <a href="#" class="issue" title="Hromadná změna nezmění kategorii úkolů (Nový)">Bug #124</a>: Hromadná změna nezmění kategorii úkolů)</li>
|
||||
<li>Odkaz na poznámku k úkolu: <strong>#124-6</strong> nebo <strong>#124#note-6</strong></li>
|
||||
<li>Odkaz na poznámku k úkolu v tom samém úkole: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Odkazy Wiki:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Příručka]]</strong> zobrazí odkaz na stránku nazvanou "Příručka": <a href="#" class="wiki-page">Příručka</a>.</li>
|
||||
<li><strong>[[Příručka#čtěte-více]]</strong> Vás přenese ke kotvě "čtěte-více". Nadpisy mají automaticky přiřazené kotvy, na které se můžete odkazovat: <a href="#" class="wiki-page">Příručka</a>.</li>
|
||||
<li><strong>[[#čtěte více]]</strong> odkaz na kotvu "čtěte-více" aktuální stránky: <a href="#" class="wiki-page">čtěte více</a></li>
|
||||
<li><strong>[[Příručka|Uživatelský manuál]]</strong> zobrazí odkaz na tu samou stránku, ale s jiným textem: <a href="#" class="wiki-page">Uživatelský manuál</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Můžete se také odkazovat na Wiki stránky jiného projektu:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[projekt_test:Nějaká stránka]]</strong> zobrazí odkaz na stránku s názvem "Nějaká stránka" na Wiki projektu projekt_test.</li>
|
||||
<li><strong>[[projekt_test:]]</strong> zobrazí odkaz na hlavní Wiki stránku projektu projekt_test.</li>
|
||||
</ul>
|
||||
|
||||
<p>Odkazy na Wiki stránky jsou zobrazeny červeně v případě, že odkazovaná stránka dosud neexistuje, např.: <a href="#" class="wiki-page new">Neexistující stránka</a>.</p>
|
||||
|
||||
<p>Odkazy na další zdroje:</p>
|
||||
|
||||
<ul>
|
||||
<li>Dokumenty:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (odkaz na dokument s ID 17)</li>
|
||||
<li><strong>document:Úvod</strong> (odkaz na dokument s názvem "Úvod")</li>
|
||||
<li><strong>document:"Nějaký dokument"</strong> (Uvozovky se mohou použít v případě, že název obsahuje mezery.)</li>
|
||||
<li><strong>projekt_test:document:"Nějaký dokument"</strong> (odkaz na dokument s názvem "Nějaký dokument" v jiném projektu "projekt_test")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Verze:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (odkaz na verzi s ID 3)</li>
|
||||
<li><strong>version:1.0.0</strong> odkaz na verzi s názvem "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>projekt_test:version:1.0.0</strong> (odkaz na verzi "1.0.0" jiného projektu "projekt_test")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Přílohy:
|
||||
<ul>
|
||||
<li><strong>attachment:soubor.zip</strong> (odkaz na přílohu aktuálního objektu s názvem soubor.zip)</li>
|
||||
<li>Aktuálně mohou být odkazovány pouze přílohy aktuálního objektu (u úkolu mohou být odkazy pouze na přílohy danného úkolu).</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Revize:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (odkaz na revizi)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (odkaz na revizi s nečíselným označním revize)</li>
|
||||
<li><strong>svn1|r758</strong> (odkaz na revizi určitého repozitáře, pro projekty s více repozitáři)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (odkaz na revizi s nečíselným označním revize určitého repozitáře, pro projekty s více repozitáři)</li>
|
||||
<li><strong>projekt_test:r758</strong> (odkaz na revizi jiného projektu)</li>
|
||||
<li><strong>projekt_test:commit:c6f4d0fd</strong> (odkaz na revizi s nečíselným označním revize jiného projektu)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Soubory repositáře:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (odkaz na soubor umístěný v /some/file respozitáře projektu)</li>
|
||||
<li><strong>source:some/file@52</strong> (odkaz na revizi souboru č. 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (odkaz na 120. řádek souboru)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (odkaz na 120. řádek revize souboru č. 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (použijte uvozovky, když URL obsahuje mezery)</li>
|
||||
<li><strong>export:some/file</strong> (vynutit stažení souboru)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (odkaz na soubor určitého repozitáře, pro projekty s více repositáři)</li>
|
||||
<li><strong>projekt_test:source:some/file</strong> (odkaz na soubor umístěný v /some/file repositáře projektu "projekt_test")</li>
|
||||
<li><strong>projekt_test:export:some/file</strong> (vynutit stažení souboru umístěného v /some/file repositáře projektu "projekt_test")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Diskuzní fóra:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (odkaz na fórum s id 1</li>
|
||||
<li><strong>forum:Support</strong> (odkaz na fórum pojmenované Support)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (Použij dvojté uvozovkym jestliže název fóra obsahuje mezery.)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Příspěvky diskuzního fóra:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (odkaz na příspěvek s ID 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projekty:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (odkaz na projekt s ID 3)</li>
|
||||
<li><strong>project:projekt_test</strong> (odkaz na projekt pojmenovaný "projekt_test")</li>
|
||||
<li><strong>project:"projekt test"</strong> (odkaz na projekt pojmenovaný "projekt test")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Novinky:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (odkaz na novinku id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (odkaz na novinku "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (použij dvojté uvozovky, jestliže název novinky obsahuje mezery)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Uživatelé:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (odkaz na uživatele s id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (odkaz na uživatele s loginem jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (odkaz na uživatele s loginem jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Escape sekvence:</p>
|
||||
|
||||
<ul>
|
||||
<li>Zabránit parsování Redmine odkazů lze vložením vykřičníku před odkaz: !</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>Externí odkazy</h3>
|
||||
|
||||
<p>URL (začínající: www, http, https, ftp, ftps, sftp a sftps) a e-mailové adresy jsou automaticky převedeny na klikací odkazy:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>zobrazí: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>Jestliže chcete zobrazit určitý text místo URL, můžete použít standardní syntaxi Textile:</p>
|
||||
|
||||
<pre>
|
||||
"Webová stránka Redmine":https://www.redmine.org
|
||||
</pre>
|
||||
|
||||
<p>zobrazí: <a href="https://www.redmine.org" class="external">Webová stránka Redmine</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Formátování textu</h2>
|
||||
|
||||
|
||||
<p>Pro nadpisy, tučný text, tabulky a seznamy, Redmine podporuje syntaxi Markdown. Podívejte se na <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> pro informace o využití těchto vlastností. Několik příkladů je uvedeno níže, ale Markdown toho dokáže mnohem víc.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Styly písma</h3>
|
||||
|
||||
<pre>
|
||||
* **tučný**
|
||||
* *kurzíva*
|
||||
* ***tučná kurzíva***
|
||||
* ~~přeškrtnutý~~
|
||||
</pre>
|
||||
|
||||
<p>Zobrazí:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>tučný</strong></li>
|
||||
<li><em>kurzíva</em></li>
|
||||
<li><em><strong>tučná kurzíva</strong></em></li>
|
||||
<li><del>přeškrtnutý</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Vnořené obrázky</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> zobrazí obrázek z odkazu (syntaxe Markdown)</li>
|
||||
<li>Jestliže máte obrázek přiložený k Wiki stránce, může být zobrazen jako vnořený obrázek pomocí jeho jména: <strong></strong></li>
|
||||
<li>Obrázky ze schránky mohou být vloženy přímo pomocí Ctrl-v/Command-v.</li>
|
||||
<li>Soubory s obrázky mohou být přímo přetaženy do textového pole. Budou nahrány a vloženy.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Nadpisy</h3>
|
||||
|
||||
<pre>
|
||||
# Nadpis 1. úrovně
|
||||
## Nadpis 2. úrovně
|
||||
### Nadpis 3. úrovně
|
||||
</pre>
|
||||
|
||||
<p>Redmine přiřadí kotvu ke každému nadpisu, takže se na ně lze odkazovat pomocí "#Nadpis", "#Podnadpis" atd.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Odstavce</h3>
|
||||
|
||||
<p>Začněte odstavec s <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails je framework pro vývoj webových aplikací podle modelu Model-View-Control.
|
||||
Vše, co je potřeba, je databázový a webový server.
|
||||
</pre>
|
||||
|
||||
<p>Zobrazí:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails je framework pro vývoj webových aplikací podle modelu Model-View-Control.<br />Vše, co je potřeba, je databázový a webový server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Obsah</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => obsah zarovnaný doleva
|
||||
{{>toc}} => obsah zarovnaný doprava
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Vodorovná čára</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Macros</h2>
|
||||
|
||||
<p>Redmine obsahuje následující vestavěná makra:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Jednoduché makro.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Zobrazí seznam všech dostupných maker, včetně jejich popisu, existuje-li.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Zobrazí seznam dětských stránek. Bez parametrů zobrazí dětské stránky aktuální wiki stránky. Např.:</p>
|
||||
<pre><code>{{child_pages}} -- lze použít pouze z wiki stránky
|
||||
{{child_pages(depth=2)}} -- zobrazí dětské stránky pouze do 2. úrovně</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Vloží Wiki stránku. Např.:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>or to include a page of a specific project wiki:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Vloží sbalený blok textu. Např.:</p>
|
||||
<pre><code>{{collapse(Zobrazit detaily...)
|
||||
Toto je blok textu, který je sbalený.
|
||||
Pro rozbalení klikněte na odkaz.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Zobrazí klikací náhled obrázku. Např.:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Vloží odkaz na úkol s volitelným textem. Např.:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Rozšířené možnosti maker
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123: Rozšířené možnosti maker
|
||||
{{issue(123, tracker=false)}} -- #123: Rozšířené možnosti maker
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Úkol #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Zvýrazňování kódu</h2>
|
||||
|
||||
<p>Výchozí zvýrazňování kódu závisí na <a href="https://rouge.jneen.net/" class="external">Rouge</a>, zvýrazňovači kódu napsanému v Ruby. Rouge podporuje mnoho běžně používaných jazyků, jako jsou <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) - jména v závorkách jsou aliasy. Podívejte se, prosím, na <a href="<%= help_code_highlighting_path %>" target="_blank">seznam jazyků poporovaných zvýrazňovačem kódu Redmine</a>.</p>
|
||||
|
||||
<p>Kód můžete na stránce zvýraznit pomocí následující syntaxe (záleží na velikosti písma jazyku nebo aliasu):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Zde vložte Váš kód.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Např:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Ahoj </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki formátování</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1><h1>Syntaxe Wiki - rychlý náhled</h1> (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Styly písma <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">více</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "tučný" }) %></th><td style="width:50%;">**tučný**</td><td style="width:50%;"><strong>tučný</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "kurzíva" }) %></th><td>*kurzíva*</td><td><em>kurzíva</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "podtržený" }) %></th><td>_podtržený_</td><td><ins>podtržený</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "smazaný" }) %></th><td>~~přeškrtnutý~~</td><td><del>Přeškrtnutý</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "vnořený kód" }) %></th><td>`vnořený kód`</td><td><code>vnořený kód</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> řádky<br /> kódu<br />```</td><td>
|
||||
<pre>
|
||||
řádky
|
||||
kódu
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Zvýrazněný kód <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">více</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">podporované jazyky</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Highlighted code" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Ahoj'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Ahoj'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Seznamy</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Nesetříděný seznam" }) %></th><td>* Položka 1<br /> * Pod<br />* Položka 2</td><td><ul><li>Položka 1<ul><li>Pod</li></ul></li><li>Položka 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Setříděný seznam" }) %></th><td>1. Položka 1<br /> 1. Pod<br />2. Položka 2</td><td><ol><li>Položka 1<ol><li>Pod</li></ol></li><li>Položka 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Nadpisy <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">více</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># Nadpis 1</td><td><h1>Nadpis 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## Nadpis 2</td><td><h2>Nadpis 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### Nadpis 3</td><td><h3>Nadpis 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Odkazy <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Odkaz](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine odkazy <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">více</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link to a Wiki page" }) %></th><td>[[Wiki stránka]]</td><td><a href="#">Wiki stránka</a></td></tr>
|
||||
<tr><th></th><td>Úkol #12</td><td>Úkol <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Úkol #12</a>: Předmět úkolu</td></tr>
|
||||
<tr><th></th><td>Revize r43</td><td>Revize <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Vnořené obrázky <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Obrázek" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tabulky</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">Více informací</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,342 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>Redmine Wiki-Formatierung (Markdown) detailliert</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Redmine Wiki-Formatierung (Markdown) detailliert</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine interne Links</a></li>
|
||||
<li><a href='#4'>Externe Links</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Textformatierung</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Schriftstile</a></li>
|
||||
<li><a href='#7'>Eingebettete Bilder</a></li>
|
||||
<li><a href='#8'>Überschriften</a></li>
|
||||
<li><a href='#10'>Blockzitate</a></li>
|
||||
<li><a href='#11'>Inhaltsverzeichnis</a></li>
|
||||
<li><a href='#14'>Horizontale Linie</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Makros</a></li>
|
||||
<li><a href='#13'>Hervorgehobener Programmcode</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine interne Links</h3>
|
||||
|
||||
<p>Redmine erlaubt Hyperlinks zwischen Ressourcen (Tickets, Änderungssätze, Wiki-Seiten...) überall dort, wo Wiki-Formatierung verwendet wird.</p>
|
||||
<ul>
|
||||
<li>Link zu einem Ticket: <strong>#124</strong> (wird angezeigt als: <del><a href="#" class="issue" title="Die Massenbearbeitung ändert nicht die Eigenschaften der Kategorie oder der festen Versionseigenschaften (Geschlossen)">#124</a></del>, Link ist durchgestrichen, wenn das Ticket geschlossen ist)</li>
|
||||
<li>Link zu einem Ticket mit Name und Betreff des Trackers: <strong>##124</strong> (zeigt <a href="#" class="issue" title="Die Massenbearbeitung ändert nicht die Eigenschaften der Kategorie oder der festen Versionseigenschaften (Neu)">Fehler #124</a>: Die Massenbearbeitung ändert nicht die Eigenschaften der Kategorie oder der festen Versionseigenschaften)</li>
|
||||
<li>Link zu einer Ticketnotiz: <strong>#124-6</strong>, oder <strong>#124#note-6</strong></li>
|
||||
<li>Link zu einer Ticketnotiz innerhalb des selben Tickets: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki-Links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Anleitung]]</strong> zeigt einen Link zur Seite mit dem Namen „Anleitung“ an: <a href="#" class="wiki-page">Anleitung</a></li>
|
||||
<li><strong>[[Leitfaden#Unterpunkt]]</strong> führt Sie zum Anker "Unterpunkt". Überschriften bekommen automatisch Anker zugewiesen, damit Sie darauf verweisen können: Leitfaden <a href="#" class="wiki-page">Leitfaden</a></li>
|
||||
<li><strong>[[#Unterpunkt]]</strong>Link zum Anker "Unterpunkt" der aktuellen Seite: <a href="#" class="wiki-page">#Unterpunkt</a></li>
|
||||
<li><strong>[[Anleitung|Benutzerhandbuch]]</strong> zeigt einen Link zu derselben Seite, aber mit einem anderen Text: <a href="#" class="wiki-page">Benutzerhandbuch</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Sie können auch auf Seiten eines anderen Projekt-Wikis verlinken:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:Eine Seite]]</strong> zeigt einen Link zu der Seite namens 'Eine Seite' des Sandbox-Wikis an</li>
|
||||
<li><strong>[[sandbox:]]</strong> zeigt einen Link zur Hauptseite des Sandbox-Wikis an</li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki-Links werden rot angezeigt, wenn die Seite noch nicht existiert, zB: <a href="#" class="wiki-page new">Nicht vorhandene Seite</a>.</p>
|
||||
|
||||
<p>Links zu anderen Ressourcen:</p>
|
||||
|
||||
<ul>
|
||||
<li>Dokumente:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (Link zum Dokument mit der ID 17)</li>
|
||||
<li><strong>document:Willkommen</strong> (Link zum Dokument mit dem Titel "Willkommen")</li>
|
||||
<li><strong>document:"Ein Dokument"</strong> (doppelte Anführungszeichen können verwendet werden, wenn der Dokumenttitel Leerzeichen enthält)</li>
|
||||
<li><strong>sandbox:document:"Ein Dokument"</strong> (Link zu einem Dokument mit dem Titel "Ein Dokument" in einem anderen Projekt "Sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Versionen:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (ink zur Version mit der ID 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (Link zur Version mit dem Namen "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong> (doppelte Anführungszeichen können verwendet werden, wenn die Version Leerzeichen enthält)</li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (Link zu Version „1.0.0“ im Projekt „Sandbox“)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Anhänge:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (Link zum Anhang des aktuellen Objekts mit dem Namen file.zip)</li>
|
||||
<li>Im Moment können nur Anhänge des aktuellen Objekts referenziert werden (wenn Sie sich in einem Problem befinden, können nur Anhänge dieses Problems referenziert werden).</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Änderungssätze:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (Link zu einem Changeset)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (Link zu einem Changeset mit einem nicht numerischen Hash)</li>
|
||||
<li><strong>svn1|r758</strong> (Link zu einem Changeset eines bestimmten Repositorys, für Projekte mit mehreren Repositorys)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (Link zu einem Changeset mit einem nicht numerischen Hash eines bestimmten Repositorys)</li>
|
||||
<li><strong>sandbox:r758</strong> (Link zu einem Changeset eines anderen Projekts)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (Link zu einem Changeset mit einem nicht numerischen Hash eines anderen Projekts)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository-Dateien:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (Link zu der Datei, die sich unter /some/file im Repository des Projekts befindet)</li>
|
||||
<li><strong>source:some/file@52</strong> (Link zur Revision 52 der Datei)</li>
|
||||
<li><strong>source:some/file#L120</strong> (Link zur Revision 52 der Datei)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (Link zu Zeile 120 der Revision 52 der Datei)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (verwenden Sie doppelte Anführungszeichen, wenn die URL Leerzeichen enthält)</li>
|
||||
<li><strong>export:some/file</strong> (Download der Datei erzwingen)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (Link zu einer Datei eines bestimmten Repositorys, für Projekte mit mehreren Repositorys)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (Link zu der Datei, die sich unter /some/file im Repository des Projekts „Sandbox“ befindet)</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (Download der Datei erzwingen)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Foren:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (Link zum Forum mit der ID 1)</li>
|
||||
<li><strong>forum:Support</strong> (Link zum Forum namens Support)</li>
|
||||
<li><strong>forum:"Technischer Support"</strong> (verwenden Sie doppelte Anführungszeichen, wenn der Forumsname Leerzeichen enthält)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forumsnachrichten:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (Link zur Nachricht mit der ID 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projekte:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (Link zu Projekt mit ID 3)</li>
|
||||
<li><strong>project:Projekt</strong> (Link zu Projekt mit Namen oder Slug von „Projekt“)</li>
|
||||
<li><strong>project:"Ein Projekt"</strong> (verwenden Sie doppelte Anführungszeichen für Projektnamen mit Leerzeichen)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Nachrichten:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (lLink zur Nachricht mit der ID 2)</li>
|
||||
<li><strong>news:Willkommen</strong> (Link zum Nachrichtenartikel namens „Willkommen“)</li>
|
||||
<li><strong>news:"Erste Neuigkeiten"</strong> (verwenden Sie doppelte Anführungszeichen, wenn der Name der Nachricht Leerzeichen enthält)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Benutzer:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (Link zu Benutzer mit ID 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link zu Benutzer mit Login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link zu Benutzer mit Login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Link Unterdrückung:</p>
|
||||
|
||||
<ul>
|
||||
<li>Sie können verhindern, dass Redmine-Links geparst werden, indem Sie ihnen ein Ausrufezeichen voranstellen: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>Externe Links</h3>
|
||||
|
||||
<p>URLs (beginnend mit: www, http, https, ftp, ftps, sftp und sftps) und E-Mail-Adressen werden automatisch in anklickbare Links umgewandelt:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>Anzeige: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>Wenn Sie anstelle der URL einen bestimmten Text anzeigen möchten, können Sie die Standard-Markdown-Syntax verwenden:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine Webseite](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>Anzeige: <a href="https://www.redmine.org" class="external">Redmine Webseite</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Textformatierung</h2>
|
||||
|
||||
|
||||
<p>Für Dinge wie Überschriften, Fettdruck, Tabellen, Listen unterstützt Redmine die Markdown-Syntax. Informationen zur Verwendung dieser Funktionen <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> for information on using any of these features. Ein paar Beispiele sind unten enthalten, aber die Engine unterstützt noch viel mehr Funktionen.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Schriftstil</h3>
|
||||
|
||||
<pre>
|
||||
* **Fett gedruckt**
|
||||
* *kursiv*
|
||||
* ***Fett Kursiv***
|
||||
* _unterstrichen_
|
||||
* ~~durchgestrichen~~
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Fett gedruckt</strong></li>
|
||||
<li><em>kursiv</em></li>
|
||||
<li><em><strong>Fett Kursiv</strong></em></li>
|
||||
<li><u>unterstrichen</u></li>
|
||||
<li><del>durchgestrichen</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Eingebettete Bilder</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> zeigt ein Bild an, das sich unter image_url befindet (Markdown-Syntax)</li>
|
||||
<li>Wenn Sie ein Bild an Ihre Wiki-Seite angehängt haben, kann es mit seinem Dateinamen inline angezeigt werden: <strong></strong></li>
|
||||
<li>Bilder aus der Zwischenablage Ihres Computers können direkt mit Strg-v oder cmd-v eingefügt werden (beachten Sie, dass ältere Browser inklusive aller Versionen des "Internet Explorer" nicht unterstützt werden)</li>
|
||||
<li>Bilddateien können zum Hochladen und Einbetten auf den Textbereich gezogen werden.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Überschriften</h3>
|
||||
|
||||
<pre>
|
||||
# Überschrift
|
||||
## Untertitel
|
||||
### untergeordneter Untertitel
|
||||
</pre>
|
||||
|
||||
<p>Redmine weist jeder dieser Überschriften einen Anker zu, sodass Sie mit „#Überschrift“, „#Untertitel“ usw. darauf verlinken können.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Blockzitat</h3>
|
||||
|
||||
<p>Beginnen Sie den Absatz mit <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails ist ein Full-Stack-Framework zur Entwicklung datenbankgestützter Webanwendungen nach dem Model-View-Control-Muster.
|
||||
Um live zu gehen, müssen Sie lediglich eine Datenbank und einen Webserver hinzufügen.
|
||||
</pre>
|
||||
|
||||
<p>Anzeige:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails ist ein Full-Stack-Framework zur Entwicklung datenbankgestützter Webanwendungen nach dem Model-View-Control-Muster.<br />Um live zu gehen, müssen Sie lediglich eine Datenbank und einen Webserver hinzufügen.</p>
|
||||
</blockquote>
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Inhaltsverzeichnis</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => linksbündiges Inhaltsverzeichnis
|
||||
{{>toc}} => rechtsbündiges Inhaltsverzeichnis
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Horizontale Linie</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
<p>Anzeige</p>
|
||||
<hr>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Makros</h2>
|
||||
|
||||
<p>Redmine hat folgende, eingebauten Makros:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Beispielmakro</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Zeigt eine Liste aller verfügbaren Makros an, einschließlich Beschreibung, falls verfügbar.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Zeigt eine Liste der untergeordneten Seiten an. Ohne Argument zeigt es die untergeordneten Seiten der aktuellen Wiki-Seite an. Beispiele:</p>
|
||||
<pre><code>{{child_pages}} -- kann nur von einer Wiki-Seite aus verwendet werden
|
||||
{{child_pages(depth=2)}} -- nur Verschachtelung mit 2 Ebenen anzeigen</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Fügt eine Wiki-Seite hinzu. Beispiel:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>oder um eine Seite eines bestimmten Projekt-Wikis einzufügen:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Einfügung von reduzierten Textblöcken. Beispiel:</p>
|
||||
<pre><code>{{collapse(Details anzeigen...)
|
||||
Dies ist ein Textblock, der standardmäßig reduziert ist.
|
||||
Es kann durch Klicken auf einen Link erweitert werden.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Zeigt eine anklickbare Miniaturansicht eines angehängten Bildes an. Beispiele:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Fügt einen Link zu einem Ticket mit flexiblem Text ein. Beispiele:</p>
|
||||
<pre>{{issue(123)}} -- Fehler #123: Makrofunktionen verbessern
|
||||
{{issue(123, project=true)}} -- Andromeda – Fehler #123: Makrofähigkeiten verbessern
|
||||
{{issue(123, tracker=false)}} -- #123: Makrofähigkeiten verbessern
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Fehler #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Code-Hervorhebung</h2>
|
||||
|
||||
<p>Die standardmäßige Code-Hervorhebung basiert auf <a href="https://rouge.jneen.net/" class="external">Rouge</a>, einem reinen Ruby-Code-Highlighter. Rouge unterstützt viele häufig verwendete Sprachen wie <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> und <strong>yaml</strong> (yml) - die Namen in Klammern sind Aliase. Bitte beachten Sie die <a href="<%= help_code_highlighting_path %>" target="_blank">Liste der Sprachen, die vom Redmine-Code-Highlighter unterstützt werden</a>.</p>
|
||||
|
||||
<p>Sie können Code an jeder Stelle hervorheben, die Wiki-Formatierung mit dieser Syntax unterstützt (beachten Sie, dass beim Sprachnamen oder Alias die Groß-/Kleinschreibung nicht beachtet wird):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Geben Sie hier Ihren Code ein.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Beispiel:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># Die Greeter-Klasse</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hallo </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wikiformatierung</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Wiki Syntax Schnellreferenz (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Schriftarten <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">mehr</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Fett" }) %></th><td style="width:50%;">**Fett**</td><td style="width:50%;"><strong>Fett</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Kursiv" }) %></th><td>*Kursiv*</td><td><em>Kursiv</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Unterstrichen" }) %></th><td>_Unterstrichen_</td><td><ins>Unterstrichen</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Durchgestrichen" }) %></th><td>~~Durchgestrichen~~</td><td><del>Durchgestrichen</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Inline code" }) %></th><td>`Inline Code`</td><td><code>Inline Code</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> vorformatierte<br /> Textzeilen<br />```</td><td>
|
||||
<pre>
|
||||
vorformatierte
|
||||
Textzeilen
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Hervorgehobener Programmcode <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">mehr</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">Unterstützte Sprachen</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Highlighted code" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Listen</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Ungeordnete Liste" }) %></th><td>* Element 1<br /> * Sub<br />* Element 2</td><td><ul><li>Element 1<ul><li>Sub</li></ul></li><li>Element 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Geordnete Liste" }) %></th><td>1. Element 1<br /> 1. Sub<br />2. Element 2</td><td><ol><li>Element 1<ol><li>Sub</li></ol></li><li>Element 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Überschriften <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">mehr</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Überschrift 1" }) %></th><td># Titel 1</td><td><h1>Titel 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Überschrift 2" }) %></th><td>## Titel 2</td><td><h2>Titel 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Überschrift 3" }) %></th><td>### Titel 3</td><td><h3>Titel 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Externe Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">mehr</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine interne Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">mehr</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link zu einer Wiki Seite" }) %></th><td>[[Wiki Seite]]</td><td><a href="#">Wiki Seite</a></td></tr>
|
||||
<tr><th></th><td>Ticket #12</td><td>Ticket <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Fehler #12</a>: Titel der Aufgabe</td></tr>
|
||||
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">eingebettete Bilder <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">mehr</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Bild" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tabellen</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">Weitere Informationen</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,341 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki formatting (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine links</a></li>
|
||||
<li><a href='#4'>External links</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Text formatting</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Font style</a></li>
|
||||
<li><a href='#7'>Inline images</a></li>
|
||||
<li><a href='#8'>Headings</a></li>
|
||||
<li><a href='#10'>Blockquotes</a></li>
|
||||
<li><a href='#11'>Table of content</a></li>
|
||||
<li><a href='#14'>Horizontal Rule</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Macros</a></li>
|
||||
<li><a href='#13'>Code highlighting</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine links</h3>
|
||||
|
||||
<p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
|
||||
<ul>
|
||||
<li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>You can also link to pages of an other project wiki:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
|
||||
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>Links to other resources:</p>
|
||||
|
||||
<ul>
|
||||
<li>Documents:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (link to document with id 17)</li>
|
||||
<li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
|
||||
<li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Versions:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (link to version with id 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Attachments:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
|
||||
<li>For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Changesets:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (link to a changeset)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
|
||||
<li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
|
||||
<li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository files:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
|
||||
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
|
||||
<li><strong>export:some/file</strong> (force the download of the file)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forums:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (link to forum with id 1</li>
|
||||
<li><strong>forum:Support</strong> (link to forum named Support)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forum messages:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (link to message with id 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projects:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (link to project with id 3)</li>
|
||||
<li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
|
||||
<li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>News:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (link to news item with id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Escaping:</p>
|
||||
|
||||
<ul>
|
||||
<li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>External links</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>displays: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>If you want to display a specific text instead of the URL, you can use the standard markdown syntax:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>displays: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
|
||||
|
||||
|
||||
<p>For things such as headlines, bold, tables, lists, Redmine supports Markdown syntax. See <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Font style</h3>
|
||||
|
||||
<pre>
|
||||
* **bold**
|
||||
* *Italic*
|
||||
* ***bold italic***
|
||||
* _underline_
|
||||
* ~~strike-through~~
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>bold</strong></li>
|
||||
<li><em>italic</em></li>
|
||||
<li><em><strong>bold italic</strong></em></li>
|
||||
<li><u>underline</u></li>
|
||||
<li><del>strike-through</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> displays an image located at image_url (markdown syntax)</li>
|
||||
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong></strong></li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Headings</h3>
|
||||
|
||||
<pre>
|
||||
# Heading
|
||||
## Subheading
|
||||
### Subsubheading
|
||||
</pre>
|
||||
|
||||
<p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
|
||||
|
||||
<p>Start the paragraph with <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => left aligned toc
|
||||
{{>toc}} => right aligned toc
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Macros</h2>
|
||||
|
||||
<p>Redmine has the following builtin macros:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Sample macro.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Displays a list of all available macros, including description if available.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
|
||||
<pre><code>{{child_pages}} -- can be used from a wiki page only
|
||||
{{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Include a wiki page. Example:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>or to include a page of a specific project wiki:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Inserts of collapsed block of text. Example:</p>
|
||||
<pre><code>{{collapse(View details...)
|
||||
This is a block of text that is collapsed by default.
|
||||
It can be expanded by clicking a link.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki formatting</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Wiki Syntax Quick Reference (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Font Styles <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Strong" }) %></th><td style="width:50%;">**Strong**</td><td style="width:50%;"><strong>Strong</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Italic" }) %></th><td>*Italic*</td><td><em>Italic</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Underline" }) %></th><td>_Underline_</td><td><ins>Underline</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Deleted" }) %></th><td>~~Deleted~~</td><td><del>Deleted</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Inline code" }) %></th><td>`Inline Code`</td><td><code>Inline Code</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> lines<br /> of code<br />```</td><td>
|
||||
<pre>
|
||||
lines
|
||||
of code
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Highlighted code <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Highlighted code" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Lists</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Unordered list" }) %></th><td>* Item 1<br /> * Sub<br />* Item 2</td><td><ul><li>Item 1<ul><li>Sub</li></ul></li><li>Item 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Ordered list" }) %></th><td>1. Item 1<br /> 1. Sub<br />2. Item 2</td><td><ol><li>Item 1<ol><li>Sub</li></ol></li><li>Item 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Headings <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># Title 1</td><td><h1>Title 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## Title 2</td><td><h2>Title 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### Title 3</td><td><h3>Title 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link to a Wiki page" }) %></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
|
||||
<tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Inline images <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tables</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">More Information</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,341 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki formatting (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine links</a></li>
|
||||
<li><a href='#4'>External links</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Text formatting</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Font style</a></li>
|
||||
<li><a href='#7'>Inline images</a></li>
|
||||
<li><a href='#8'>Headings</a></li>
|
||||
<li><a href='#10'>Blockquotes</a></li>
|
||||
<li><a href='#11'>Table of content</a></li>
|
||||
<li><a href='#14'>Horizontal Rule</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Macros</a></li>
|
||||
<li><a href='#13'>Code highlighting</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine links</h3>
|
||||
|
||||
<p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
|
||||
<ul>
|
||||
<li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>You can also link to pages of an other project wiki:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
|
||||
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>Links to other resources:</p>
|
||||
|
||||
<ul>
|
||||
<li>Documents:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (link to document with id 17)</li>
|
||||
<li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
|
||||
<li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Versions:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (link to version with id 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Attachments:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
|
||||
<li>For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Changesets:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (link to a changeset)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
|
||||
<li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
|
||||
<li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository files:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
|
||||
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
|
||||
<li><strong>export:some/file</strong> (force the download of the file)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forums:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (link to forum with id 1</li>
|
||||
<li><strong>forum:Support</strong> (link to forum named Support)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forum messages:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (link to message with id 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projects:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (link to project with id 3)</li>
|
||||
<li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
|
||||
<li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>News:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (link to news item with id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Escaping:</p>
|
||||
|
||||
<ul>
|
||||
<li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>External links</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>displays: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>If you want to display a specific text instead of the URL, you can use the standard markdown syntax:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>displays: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
|
||||
|
||||
|
||||
<p>For things such as headlines, bold, tables, lists, Redmine supports Markdown syntax. See <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Font style</h3>
|
||||
|
||||
<pre>
|
||||
* **bold**
|
||||
* *Italic*
|
||||
* ***bold italic***
|
||||
* _underline_
|
||||
* ~~strike-through~~
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>bold</strong></li>
|
||||
<li><em>italic</em></li>
|
||||
<li><em><strong>bold italic</strong></em></li>
|
||||
<li><u>underline</u></li>
|
||||
<li><del>strike-through</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> displays an image located at image_url (markdown syntax)</li>
|
||||
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong></strong></li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Headings</h3>
|
||||
|
||||
<pre>
|
||||
# Heading
|
||||
## Subheading
|
||||
### Subsubheading
|
||||
</pre>
|
||||
|
||||
<p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
|
||||
|
||||
<p>Start the paragraph with <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => left aligned toc
|
||||
{{>toc}} => right aligned toc
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Macros</h2>
|
||||
|
||||
<p>Redmine has the following builtin macros:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Sample macro.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Displays a list of all available macros, including description if available.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
|
||||
<pre><code>{{child_pages}} -- can be used from a wiki page only
|
||||
{{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Include a wiki page. Example:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>or to include a page of a specific project wiki:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Inserts of collapsed block of text. Example:</p>
|
||||
<pre><code>{{collapse(View details...)
|
||||
This is a block of text that is collapsed by default.
|
||||
It can be expanded by clicking a link.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki formatting</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Wiki Syntax Quick Reference (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Font Styles <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Strong" }) %></th><td style="width:50%;">**Strong**</td><td style="width:50%;"><strong>Strong</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Italic" }) %></th><td>*Italic*</td><td><em>Italic</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Underline" }) %></th><td>_Underline_</td><td><ins>Underline</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Deleted" }) %></th><td>~~Deleted~~</td><td><del>Deleted</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Inline code" }) %></th><td>`Inline Code`</td><td><code>Inline Code</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> lines<br /> of code<br />```</td><td>
|
||||
<pre>
|
||||
lines
|
||||
of code
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Highlighted code <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Código resaltado" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Lists</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Unordered list" }) %></th><td>* Item 1<br /> * Sub<br />* Item 2</td><td><ul><li>Item 1<ul><li>Sub</li></ul></li><li>Item 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Ordered list" }) %></th><td>1. Item 1<br /> 1. Sub<br />2. Item 2</td><td><ol><li>Item 1<ol><li>Sub</li></ol></li><li>Item 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Headings <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># Title 1</td><td><h1>Title 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## Title 2</td><td><h2>Title 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### Title 3</td><td><h3>Title 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link to a Wiki page" }) %></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
|
||||
<tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Inline images <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tables</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">More Information</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,341 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki formatting (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine links</a></li>
|
||||
<li><a href='#4'>External links</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Text formatting</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Font style</a></li>
|
||||
<li><a href='#7'>Inline images</a></li>
|
||||
<li><a href='#8'>Headings</a></li>
|
||||
<li><a href='#10'>Blockquotes</a></li>
|
||||
<li><a href='#11'>Table of content</a></li>
|
||||
<li><a href='#14'>Horizontal Rule</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Macros</a></li>
|
||||
<li><a href='#13'>Code highlighting</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine links</h3>
|
||||
|
||||
<p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
|
||||
<ul>
|
||||
<li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>You can also link to pages of an other project wiki:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
|
||||
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>Links to other resources:</p>
|
||||
|
||||
<ul>
|
||||
<li>Documents:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (link to document with id 17)</li>
|
||||
<li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
|
||||
<li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Versions:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (link to version with id 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Attachments:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
|
||||
<li>For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Changesets:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (link to a changeset)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
|
||||
<li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
|
||||
<li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository files:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
|
||||
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
|
||||
<li><strong>export:some/file</strong> (force the download of the file)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forums:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (link to forum with id 1</li>
|
||||
<li><strong>forum:Support</strong> (link to forum named Support)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forum messages:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (link to message with id 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projects:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (link to project with id 3)</li>
|
||||
<li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
|
||||
<li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>News:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (link to news item with id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Escaping:</p>
|
||||
|
||||
<ul>
|
||||
<li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>External links</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>displays: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>If you want to display a specific text instead of the URL, you can use the standard markdown syntax:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>displays: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
|
||||
|
||||
|
||||
<p>For things such as headlines, bold, tables, lists, Redmine supports Markdown syntax. See <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Font style</h3>
|
||||
|
||||
<pre>
|
||||
* **bold**
|
||||
* *Italic*
|
||||
* ***bold italic***
|
||||
* _underline_
|
||||
* ~~strike-through~~
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>bold</strong></li>
|
||||
<li><em>italic</em></li>
|
||||
<li><em><strong>bold italic</strong></em></li>
|
||||
<li><u>underline</u></li>
|
||||
<li><del>strike-through</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> displays an image located at image_url (markdown syntax)</li>
|
||||
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong></strong></li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Headings</h3>
|
||||
|
||||
<pre>
|
||||
# Heading
|
||||
## Subheading
|
||||
### Subsubheading
|
||||
</pre>
|
||||
|
||||
<p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
|
||||
|
||||
<p>Start the paragraph with <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => left aligned toc
|
||||
{{>toc}} => right aligned toc
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Macros</h2>
|
||||
|
||||
<p>Redmine has the following builtin macros:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Sample macro.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Displays a list of all available macros, including description if available.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
|
||||
<pre><code>{{child_pages}} -- can be used from a wiki page only
|
||||
{{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Include a wiki page. Example:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>or to include a page of a specific project wiki:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Inserts of collapsed block of text. Example:</p>
|
||||
<pre><code>{{collapse(View details...)
|
||||
This is a block of text that is collapsed by default.
|
||||
It can be expanded by clicking a link.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki formatting</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Wiki Syntax Quick Reference (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Font Styles <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Strong" }) %></th><td style="width:50%;">**Strong**</td><td style="width:50%;"><strong>Strong</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Italic" }) %></th><td>*Italic*</td><td><em>Italic</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Underline" }) %></th><td>_Underline_</td><td><ins>Underline</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Deleted" }) %></th><td>~~Deleted~~</td><td><del>Deleted</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Inline code" }) %></th><td>`Inline Code`</td><td><code>Inline Code</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> lines<br /> of code<br />```</td><td>
|
||||
<pre>
|
||||
lines
|
||||
of code
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Highlighted code <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Código resaltado" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Lists</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Unordered list" }) %></th><td>* Item 1<br /> * Sub<br />* Item 2</td><td><ul><li>Item 1<ul><li>Sub</li></ul></li><li>Item 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Ordered list" }) %></th><td>1. Item 1<br /> 1. Sub<br />2. Item 2</td><td><ol><li>Item 1<ol><li>Sub</li></ol></li><li>Item 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Headings <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># Title 1</td><td><h1>Title 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## Title 2</td><td><h2>Title 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### Title 3</td><td><h3>Title 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link to a Wiki page" }) %></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
|
||||
<tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Inline images <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tables</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">More Information</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,341 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki formatting (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine links</a></li>
|
||||
<li><a href='#4'>External links</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Text formatting</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Font style</a></li>
|
||||
<li><a href='#7'>Inline images</a></li>
|
||||
<li><a href='#8'>Headings</a></li>
|
||||
<li><a href='#10'>Blockquotes</a></li>
|
||||
<li><a href='#11'>Table of content</a></li>
|
||||
<li><a href='#14'>Horizontal Rule</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Macros</a></li>
|
||||
<li><a href='#13'>Code highlighting</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine links</h3>
|
||||
|
||||
<p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
|
||||
<ul>
|
||||
<li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>You can also link to pages of an other project wiki:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
|
||||
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>Links to other resources:</p>
|
||||
|
||||
<ul>
|
||||
<li>Documents:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (link to document with id 17)</li>
|
||||
<li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
|
||||
<li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Versions:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (link to version with id 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Attachments:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
|
||||
<li>For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Changesets:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (link to a changeset)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
|
||||
<li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
|
||||
<li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository files:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
|
||||
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
|
||||
<li><strong>export:some/file</strong> (force the download of the file)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forums:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (link to forum with id 1</li>
|
||||
<li><strong>forum:Support</strong> (link to forum named Support)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forum messages:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (link to message with id 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projects:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (link to project with id 3)</li>
|
||||
<li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
|
||||
<li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>News:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (link to news item with id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Escaping:</p>
|
||||
|
||||
<ul>
|
||||
<li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>External links</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>displays: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>If you want to display a specific text instead of the URL, you can use the standard markdown syntax:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>displays: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
|
||||
|
||||
|
||||
<p>For things such as headlines, bold, tables, lists, Redmine supports Markdown syntax. See <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Font style</h3>
|
||||
|
||||
<pre>
|
||||
* **bold**
|
||||
* *Italic*
|
||||
* ***bold italic***
|
||||
* _underline_
|
||||
* ~~strike-through~~
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>bold</strong></li>
|
||||
<li><em>italic</em></li>
|
||||
<li><em><strong>bold italic</strong></em></li>
|
||||
<li><u>underline</u></li>
|
||||
<li><del>strike-through</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> displays an image located at image_url (markdown syntax)</li>
|
||||
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong></strong></li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Headings</h3>
|
||||
|
||||
<pre>
|
||||
# Heading
|
||||
## Subheading
|
||||
### Subsubheading
|
||||
</pre>
|
||||
|
||||
<p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
|
||||
|
||||
<p>Start the paragraph with <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => left aligned toc
|
||||
{{>toc}} => right aligned toc
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Macros</h2>
|
||||
|
||||
<p>Redmine has the following builtin macros:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Sample macro.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Displays a list of all available macros, including description if available.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
|
||||
<pre><code>{{child_pages}} -- can be used from a wiki page only
|
||||
{{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Include a wiki page. Example:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>or to include a page of a specific project wiki:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Inserts of collapsed block of text. Example:</p>
|
||||
<pre><code>{{collapse(View details...)
|
||||
This is a block of text that is collapsed by default.
|
||||
It can be expanded by clicking a link.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki formatting</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Wiki Syntax Quick Reference (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Font Styles <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Strong" }) %></th><td style="width:50%;">**Strong**</td><td style="width:50%;"><strong>Strong</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Italic" }) %></th><td>*Italic*</td><td><em>Italic</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Underline" }) %></th><td>_Underline_</td><td><ins>Underline</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Deleted" }) %></th><td>~~Deleted~~</td><td><del>Deleted</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Inline code" }) %></th><td>`Inline Code`</td><td><code>Inline Code</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> lines<br /> of code<br />```</td><td>
|
||||
<pre>
|
||||
lines
|
||||
of code
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Highlighted code <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Code colorisé" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Lists</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Unordered list" }) %></th><td>* Item 1<br /> * Sub<br />* Item 2</td><td><ul><li>Item 1<ul><li>Sub</li></ul></li><li>Item 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Ordered list" }) %></th><td>1. Item 1<br /> 1. Sub<br />2. Item 2</td><td><ol><li>Item 1<ol><li>Sub</li></ol></li><li>Item 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Headings <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># Title 1</td><td><h1>Title 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## Title 2</td><td><h2>Title 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### Title 3</td><td><h3>Title 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link to a Wiki page" }) %></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
|
||||
<tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Inline images <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tables</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">More Information</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,340 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki formatting (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine links</a></li>
|
||||
<li><a href='#4'>External links</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Text formatting</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Font style</a></li>
|
||||
<li><a href='#7'>Inline images</a></li>
|
||||
<li><a href='#8'>Headings</a></li>
|
||||
<li><a href='#10'>Blockquotes</a></li>
|
||||
<li><a href='#11'>Table of content</a></li>
|
||||
<li><a href='#14'>Horizontal Rule</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Macros</a></li>
|
||||
<li><a href='#13'>Code highlighting</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine links</h3>
|
||||
|
||||
<p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
|
||||
<ul>
|
||||
<li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>You can also link to pages of an other project wiki:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
|
||||
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>Links to other resources:</p>
|
||||
|
||||
<ul>
|
||||
<li>Documents:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (link to document with id 17)</li>
|
||||
<li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
|
||||
<li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Versions:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (link to version with id 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Attachments:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
|
||||
<li>For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Changesets:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (link to a changeset)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
|
||||
<li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
|
||||
<li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository files:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
|
||||
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
|
||||
<li><strong>export:some/file</strong> (force the download of the file)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forums:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (link to forum with id 1</li>
|
||||
<li><strong>forum:Support</strong> (link to forum named Support)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forum messages:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (link to message with id 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projects:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (link to project with id 3)</li>
|
||||
<li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
|
||||
<li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>News:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (link to news item with id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Escaping:</p>
|
||||
|
||||
<ul>
|
||||
<li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>External links</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>displays: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>If you want to display a specific text instead of the URL, you can use the standard markdown syntax:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>displays: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
|
||||
|
||||
|
||||
<p>For things such as headlines, bold, tables, lists, Redmine supports Markdown syntax. See <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Font style</h3>
|
||||
|
||||
<pre>
|
||||
* **bold**
|
||||
* *Italic*
|
||||
* ***bold italic***
|
||||
* _underline_
|
||||
* ~~strike-through~~
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>bold</strong></li>
|
||||
<li><em>italic</em></li>
|
||||
<li><em><strong>bold italic</strong></em></li>
|
||||
<li><del>strike-through</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> displays an image located at image_url (markdown syntax)</li>
|
||||
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong></strong></li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Headings</h3>
|
||||
|
||||
<pre>
|
||||
# Heading
|
||||
## Subheading
|
||||
### Subsubheading
|
||||
</pre>
|
||||
|
||||
<p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
|
||||
|
||||
<p>Start the paragraph with <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => left aligned toc
|
||||
{{>toc}} => right aligned toc
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Macros</h2>
|
||||
|
||||
<p>Redmine has the following builtin macros:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Sample macro.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Displays a list of all available macros, including description if available.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
|
||||
<pre><code>{{child_pages}} -- can be used from a wiki page only
|
||||
{{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Include a wiki page. Example:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>or to include a page of a specific project wiki:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Inserts of collapsed block of text. Example:</p>
|
||||
<pre><code>{{collapse(View details...)
|
||||
This is a block of text that is collapsed by default.
|
||||
It can be expanded by clicking a link.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki formatting</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Wiki Syntax Quick Reference (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Font Styles <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Strong" }) %></th><td style="width:50%;">**Strong**</td><td style="width:50%;"><strong>Strong</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Italic" }) %></th><td>*Italic*</td><td><em>Italic</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Underline" }) %></th><td>_Underline_</td><td><ins>Underline</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Deleted" }) %></th><td>~~Deleted~~</td><td><del>Deleted</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Inline code" }) %></th><td>`Inline Code`</td><td><code>Inline Code</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> lines<br /> of code<br />```</td><td>
|
||||
<pre>
|
||||
lines
|
||||
of code
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Highlighted code <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Código resaltado" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Lists</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Unordered list" }) %></th><td>* Item 1<br /> * Sub<br />* Item 2</td><td><ul><li>Item 1<ul><li>Sub</li></ul></li><li>Item 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Ordered list" }) %></th><td>1. Item 1<br /> 1. Sub<br />2. Item 2</td><td><ol><li>Item 1<ol><li>Sub</li></ol></li><li>Item 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Headings <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># Title 1</td><td><h1>Title 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## Title 2</td><td><h2>Title 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### Title 3</td><td><h3>Title 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link to a Wiki page" }) %></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
|
||||
<tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Inline images <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tables</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">More Information</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,339 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki記法 (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine内のリンク</a></li>
|
||||
<li><a href='#4'>外部リンク</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>テキストの書式</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>文字の書式</a></li>
|
||||
<li><a href='#7'>画像</a></li>
|
||||
<li><a href='#8'>見出し</a></li>
|
||||
<li><a href='#10'>引用</a></li>
|
||||
<li><a href='#11'>目次</a></li>
|
||||
<li><a href='#14'>区切り線</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>マクロ</a></li>
|
||||
<li><a href='#13'>コードハイライト</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine内のリンク</h3>
|
||||
|
||||
<p>RedmineはWiki記法が使える箇所のどこからでも、チケット・チェンジセット・Wikiページなどのリソースへのリンクができます。</p>
|
||||
<ul>
|
||||
<li>チケットへのリンク: <strong>#124</strong> (終了したチケットは <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del> のように取り消し線付きで表示されます)</li>
|
||||
<li>チケットへのリンク (トラッカー名と題名も表示): <strong>##124</strong> (表示例: <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>チケットのコメントへのリンク: <strong>#124-6</strong> または <strong>#124#note-6</strong></li>
|
||||
<li>同じチケット内のコメントへのリンク: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wikiへのリンク:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> "Guide"という名称のページへのリンク: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> "Guide"というページ内の"further-reading"というアンカーに飛びます。見出しには自動的にアンカーが設定されるのでこのようにリンク先とすることができます: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> 同じページ内のアンカー"further-reading"へのリンク: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> "Guide"というページへのリンクを異なるテキストで表示: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>別のプロジェクトのwikiへのリンクも可能です:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> sandboxというプロジェクトのwikiの"some page"という名称のページへのリンク</li>
|
||||
<li><strong>[[sandbox:]]</strong> sanbdoxというプロジェクトのwikiのメインページへのリンク</li>
|
||||
</ul>
|
||||
|
||||
<p>存在しないwikiページへのリンクは赤で表示されます。 例: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>そのほかのリソースへのリンク:</p>
|
||||
|
||||
<ul>
|
||||
<li>文書:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (id 17の文書へのリンク)</li>
|
||||
<li><strong>document:Greetings</strong> ("Greetings" というタイトルの文書へのリンク)</li>
|
||||
<li><strong>document:"Some document"</strong> (文書のタイトルに空白が含まれる場合はダブルクォーテーションで囲んでください)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> ("sandbox" というプロジェクトの "Some document" というタイトルの文書へのリンク)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>バージョン:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (id 3のバージョンへのリンク)</li>
|
||||
<li><strong>version:1.0.0</strong> ("1.0.0"という名称のバージョンへのリンク)</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> ("sandbox"というプロジェクトの "1.0.0" という名称のバージョンへのリンク)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>添付ファイル:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (現在のオブジェクトに添付された file.zip というファイルへのリンク)</li>
|
||||
<li>現在のオブジェクト上の添付ファイルのみリンク先として指定できます (例えばあるチケットからは、そのチケットに添付されたファイルのみリンク先にできます)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>チェンジセット:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (チェンジセットへのリンク)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (ハッシュ値によるチェンジセットへのリンク)</li>
|
||||
<li><strong>svn1|r758</strong> (複数のリポジトリが設定されたプロジェクトで、特定のリポジトリのチェンジセットへのリンク)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (ハッシュ値による、特定のリポジトリのチェンジセットへのリンク)</li>
|
||||
<li><strong>sandbox:r758</strong> (他のプロジェクトのチェンジセットへのリンク)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (ハッシュ値による、他のプロジェクトのチェンジセットへのリンク)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>リポジトリ内のファイル:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (プロジェクトのリポジトリ内の /some/file というファイルへのリンク)</li>
|
||||
<li><strong>source:some/file@52</strong> (ファイルのリビジョン52へのリンク)</li>
|
||||
<li><strong>source:some/file#L120</strong> (ファイルの120行目へのリンク)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (リビジョン52のファイルの120行目へのリンク)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (URLにスペースが含まれる場合はダブルクォーテーションで囲んでください)</li>
|
||||
<li><strong>export:some/file</strong> (ファイルのダウンロードを強制)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (複数のリポジトリが設定されたプロジェクトで、特定のリポジトリのファイルへのリンク)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> ("sandbox" というプロジェクトのリポジトリ上の /some/file というファイルへのリンク)</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (ファイルのダウンロードを強制)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>フォーラム:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (id 1のフォーラムへのリンク)</li>
|
||||
<li><strong>forum:Support</strong> ("Support"という名称のフォーラムへのリンク)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (フォーラム名に空白が含まれる場合はダブルクォーテーションで囲んでください)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>フォーラムのメッセージ:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (id 1218のメッセージへのリンク)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>プロジェクト:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (id 3のプロジェクトへのリンク)</li>
|
||||
<li><strong>project:someproject</strong> ("someproject"という名称のプロジェクトへのリンク)</li>
|
||||
<li><strong>project:"some project"</strong> (プロジェクト名に空白が含まれる場合はダブルクォーテーションで囲んでください)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>ニュース:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (id 2のニュースへのリンク)</li>
|
||||
<li><strong>news:Greetings</strong> ("Greetings"というタイトルのニュースへのリンク)</li>
|
||||
<li><strong>news:"First Release"</strong> (タイトルに空白が含まれる場合はダブルクォーテーションで囲んでください)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>ユーザー:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (id 2のユーザーへのリンク)</li>
|
||||
<li><strong>user:jsmith</strong> (jsmith というログインIDのユーザーへのリンク)</li>
|
||||
<li><strong>@jsmith</strong> (jsmith というログインIDのユーザーへのリンク)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>エスケープ:</p>
|
||||
|
||||
<ul>
|
||||
<li>テキストをRedmineのリンクとして解釈させたくない場合は感嘆符 ! を前につけてください。</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>外部リンク</h3>
|
||||
|
||||
<p>URL(starting with: www, http, https, ftp, ftps, sftp and sftps)とメールアドレスは自動的にリンクになります:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>上記記述の表示例です: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>URLのかわりに別のテキストを表示させたい場合は、通常のMarkdown記法が利用できます:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>上記記述の表示例です: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>テキストの書式</h2>
|
||||
|
||||
|
||||
<p>見出し、太字、テーブル、リスト等は、RedmineはMarkdownでの記述に対応しています。Markdownの詳細は <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> を参照してください。Markdownの一例を以下に示しますが、実際にはここで取り上げた以外の記法にも対応しています。</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>文字の書式</h3>
|
||||
|
||||
<pre>
|
||||
* **太字**
|
||||
* *斜体*
|
||||
* ***太字で斜体***
|
||||
* ~~取り消し線~~
|
||||
</pre>
|
||||
|
||||
<p>表示例:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>太字</strong></li>
|
||||
<li><em>斜体</em></li>
|
||||
<li><em><strong>太字で斜体</strong></em></li>
|
||||
<li><del>取り消し線</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>画像</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> image_urlで指定されたURLの画像を表示 (Markdownの記法)</li>
|
||||
<li>Wikiページに添付された画像があれば、ファイル名を指定して画像を表示させることができます: <strong></strong></li>
|
||||
<li>PCのクリップボード内の画像は Ctrl-v または Command-v で直接貼り付けることができます (Internet Explorerには対応していません)。</li>
|
||||
<li>画像ファイルをテキストエリアにドロップするとアップロードと画像の埋め込みが行われます。</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>見出し</h3>
|
||||
|
||||
<pre>
|
||||
# Heading
|
||||
## Subheading
|
||||
### Subsubheading
|
||||
</pre>
|
||||
|
||||
<p>Redmineは見出しにアンカーを設定するので、"#Heading", "#Subheading"のように記述して見出しへのリンクが行えます。</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>引用</h3>
|
||||
|
||||
<p>段落を <strong>></strong> で開始してください。</p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>表示例:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>目次</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => 目次(左寄せ)
|
||||
{{>toc}} => 目次(右寄せ)
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>区切り線</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>マクロ</h2>
|
||||
|
||||
<p>Redmineには以下の組み込みマクロが用意されています:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>サンプルのマクロです。</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>利用可能なマクロの一覧を表示します。マクロの説明があればそれも表示します。</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>子ページの一覧を表示します。引数の指定が無ければ現在のwikiページの子ページを表示します。以下は使用例です:</p>
|
||||
<pre><code>{{child_pages}} -- wikiページでのみ使用可能です
|
||||
{{child_pages(depth=2)}} -- 2階層分のみ表示します</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>別のWikiページの内容を挿入します。 以下は使用例です:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>別プロジェクトのWikiページを挿入することもできます:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>折り畳まれた状態のテキストを挿入します。以下は使用例です:</p>
|
||||
<pre><code>{{collapse(詳細を表示...)
|
||||
この部分はデフォルトでは折り畳まれた状態で表示されます。
|
||||
リンクをクリックすると展開されます。
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>添付ファイルのクリック可能なサムネイル画像を表示します。以下は使用例です:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>チケットへのリンクをカスタマイズ可能なテキストとともに挿入します。以下は使用例です:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>コードハイライト</h2>
|
||||
|
||||
<p>RedmineはRubyで記述されたコードハイライト用ライブラリ <a href="https://rouge.jneen.net/" class="external">Rouge</a> を使用しています。Rougeは <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong>, <strong>yaml</strong> (yml) など一般的に使われている多数の言語に対応しています(括弧内の名前はコードハイライトの指定に利用できる別名です)。全対応言語の一覧は <a href="<%= help_code_highlighting_path %>" target="_blank">List of languages supported by Redmine code highlighter</a> を参照してください。</p>
|
||||
|
||||
<p>Wiki記法に対応している箇所であればどこでも以下の記述によりコードハイライトが利用できます (言語名・別名では大文字・小文字は区別されません):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>表示例:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,78 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki formatting</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Wiki記法 クイックリファレンス (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Font Styles <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">詳細</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "太字" }) %></th><td style="width:50%;">**太字**</td><td style="width:50%;"><strong>太字</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "斜体" }) %></th><td>*斜体*</td><td><em>斜体</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "取り消し線" }) %></th><td>~~取り消し線~~</td><td><del>取り消し線</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "コード" }) %></th><td>`コード`</td><td><code>コード</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> 複数行の<br /> コード<br />```</td><td>
|
||||
<pre>
|
||||
複数行の
|
||||
コード
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">コードハイライト <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">詳細</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">対応言語</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "コードハイライト" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">リスト</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "リスト" }) %></th><td>* 項目1<br /> * 下位階層の項目<br />* 項目2</td><td><ul><li>項目1<ul><li>下位階層の項目</li></ul></li><li>項目2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "順序付きリスト" }) %></th><td>1. 項目1<br /> 1. 下位階層の項目<br />2. 項目2</td><td><ol><li>項目1<ol><li>下位階層の項目</li></ol></li><li>項目2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">見出し <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">詳細</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># タイトル1</td><td><h1>タイトル1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## タイトル2</td><td><h2>タイトル2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### タイトル3</td><td><h3>タイトル3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">リンク <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">詳細</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine内のリンク <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">詳細</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Wikiページへのリンク" }) %></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
|
||||
<tr><th></th><td>チケット #12</td><td>チケット <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>リビジョン r43</td><td>リビジョン <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">画像 <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">詳細</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tables</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">より詳細なリファレンス</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,341 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki formatting (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine links</a></li>
|
||||
<li><a href='#4'>External links</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Text formatting</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Font style</a></li>
|
||||
<li><a href='#7'>Inline images</a></li>
|
||||
<li><a href='#8'>Headings</a></li>
|
||||
<li><a href='#10'>Blockquotes</a></li>
|
||||
<li><a href='#11'>Table of content</a></li>
|
||||
<li><a href='#14'>Horizontal Rule</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Macros</a></li>
|
||||
<li><a href='#13'>Code highlighting</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine links</h3>
|
||||
|
||||
<p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
|
||||
<ul>
|
||||
<li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>You can also link to pages of an other project wiki:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
|
||||
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>Links to other resources:</p>
|
||||
|
||||
<ul>
|
||||
<li>Documents:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (link to document with id 17)</li>
|
||||
<li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
|
||||
<li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Versions:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (link to version with id 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Attachments:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
|
||||
<li>For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Changesets:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (link to a changeset)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
|
||||
<li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
|
||||
<li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository files:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
|
||||
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
|
||||
<li><strong>export:some/file</strong> (force the download of the file)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forums:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (link to forum with id 1</li>
|
||||
<li><strong>forum:Support</strong> (link to forum named Support)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forum messages:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (link to message with id 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projects:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (link to project with id 3)</li>
|
||||
<li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
|
||||
<li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>News:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (link to news item with id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Escaping:</p>
|
||||
|
||||
<ul>
|
||||
<li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>External links</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>displays: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>If you want to display a specific text instead of the URL, you can use the standard markdown syntax:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>displays: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
|
||||
|
||||
|
||||
<p>For things such as headlines, bold, tables, lists, Redmine supports Markdown syntax. See <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Font style</h3>
|
||||
|
||||
<pre>
|
||||
* **bold**
|
||||
* *Italic*
|
||||
* ***bold italic***
|
||||
* _underline_
|
||||
* ~~strike-through~~
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>bold</strong></li>
|
||||
<li><em>italic</em></li>
|
||||
<li><em><strong>bold italic</strong></em></li>
|
||||
<li><u>underline</u></li>
|
||||
<li><del>strike-through</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> displays an image located at image_url (markdown syntax)</li>
|
||||
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong></strong></li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Headings</h3>
|
||||
|
||||
<pre>
|
||||
# Heading
|
||||
## Subheading
|
||||
### Subsubheading
|
||||
</pre>
|
||||
|
||||
<p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
|
||||
|
||||
<p>Start the paragraph with <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => left aligned toc
|
||||
{{>toc}} => right aligned toc
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Macros</h2>
|
||||
|
||||
<p>Redmine has the following builtin macros:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Sample macro.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Displays a list of all available macros, including description if available.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
|
||||
<pre><code>{{child_pages}} -- can be used from a wiki page only
|
||||
{{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Include a wiki page. Example:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>or to include a page of a specific project wiki:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Inserts of collapsed block of text. Example:</p>
|
||||
<pre><code>{{collapse(View details...)
|
||||
This is a block of text that is collapsed by default.
|
||||
It can be expanded by clicking a link.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki formatting</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Wiki Syntax Quick Reference (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Font Styles <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Strong" }) %></th><td style="width:50%;">**Strong**</td><td style="width:50%;"><strong>Strong</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Italic" }) %></th><td>*Italic*</td><td><em>Italic</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Underline" }) %></th><td>_Underline_</td><td><ins>Underline</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Deleted" }) %></th><td>~~Deleted~~</td><td><del>Deleted</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Inline code" }) %></th><td>`Inline Code`</td><td><code>Inline Code</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> lines<br /> of code<br />```</td><td>
|
||||
<pre>
|
||||
lines
|
||||
of code
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Highlighted code <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "색상화한 코드" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Lists</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Unordered list" }) %></th><td>* Item 1<br /> * Sub<br />* Item 2</td><td><ul><li>Item 1<ul><li>Sub</li></ul></li><li>Item 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Ordered list" }) %></th><td>1. Item 1<br /> 1. Sub<br />2. Item 2</td><td><ol><li>Item 1<ol><li>Sub</li></ol></li><li>Item 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Headings <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># Title 1</td><td><h1>Title 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## Title 2</td><td><h2>Title 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### Title 3</td><td><h3>Title 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link to a Wiki page" }) %></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
|
||||
<tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Inline images <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tables</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">More Information</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,341 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki formatting (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine links</a></li>
|
||||
<li><a href='#4'>External links</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Text formatting</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Font style</a></li>
|
||||
<li><a href='#7'>Inline images</a></li>
|
||||
<li><a href='#8'>Headings</a></li>
|
||||
<li><a href='#10'>Blockquotes</a></li>
|
||||
<li><a href='#11'>Table of content</a></li>
|
||||
<li><a href='#14'>Horizontal Rule</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Macros</a></li>
|
||||
<li><a href='#13'>Code highlighting</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine links</h3>
|
||||
|
||||
<p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
|
||||
<ul>
|
||||
<li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>You can also link to pages of an other project wiki:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
|
||||
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>Links to other resources:</p>
|
||||
|
||||
<ul>
|
||||
<li>Documents:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (link to document with id 17)</li>
|
||||
<li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
|
||||
<li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Versions:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (link to version with id 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Attachments:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
|
||||
<li>For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Changesets:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (link to a changeset)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
|
||||
<li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
|
||||
<li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository files:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
|
||||
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
|
||||
<li><strong>export:some/file</strong> (force the download of the file)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forums:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (link to forum with id 1</li>
|
||||
<li><strong>forum:Support</strong> (link to forum named Support)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forum messages:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (link to message with id 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projects:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (link to project with id 3)</li>
|
||||
<li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
|
||||
<li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>News:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (link to news item with id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Escaping:</p>
|
||||
|
||||
<ul>
|
||||
<li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>External links</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>displays: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>If you want to display a specific text instead of the URL, you can use the standard markdown syntax:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>displays: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
|
||||
|
||||
|
||||
<p>For things such as headlines, bold, tables, lists, Redmine supports Markdown syntax. See <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Font style</h3>
|
||||
|
||||
<pre>
|
||||
* **bold**
|
||||
* *Italic*
|
||||
* ***bold italic***
|
||||
* _underline_
|
||||
* ~~strike-through~~
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>bold</strong></li>
|
||||
<li><em>italic</em></li>
|
||||
<li><em><strong>bold italic</strong></em></li>
|
||||
<li><u>underline</u></li>
|
||||
<li><del>strike-through</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> displays an image located at image_url (markdown syntax)</li>
|
||||
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong></strong></li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Headings</h3>
|
||||
|
||||
<pre>
|
||||
# Heading
|
||||
## Subheading
|
||||
### Subsubheading
|
||||
</pre>
|
||||
|
||||
<p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
|
||||
|
||||
<p>Start the paragraph with <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => left aligned toc
|
||||
{{>toc}} => right aligned toc
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Macros</h2>
|
||||
|
||||
<p>Redmine has the following builtin macros:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Sample macro.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Displays a list of all available macros, including description if available.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
|
||||
<pre><code>{{child_pages}} -- can be used from a wiki page only
|
||||
{{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Include a wiki page. Example:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>or to include a page of a specific project wiki:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Inserts of collapsed block of text. Example:</p>
|
||||
<pre><code>{{collapse(View details...)
|
||||
This is a block of text that is collapsed by default.
|
||||
It can be expanded by clicking a link.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki formatting</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Wiki Syntax Quick Reference (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Font Styles <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Strong" }) %></th><td style="width:50%;">**Strong**</td><td style="width:50%;"><strong>Strong</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Italic" }) %></th><td>*Italic*</td><td><em>Italic</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Underline" }) %></th><td>_Underline_</td><td><ins>Underline</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Deleted" }) %></th><td>~~Deleted~~</td><td><del>Deleted</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Inline code" }) %></th><td>`Inline Code`</td><td><code>Inline Code</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> lines<br /> of code<br />```</td><td>
|
||||
<pre>
|
||||
lines
|
||||
of code
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Highlighted code <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Gemarkeerde code" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Lists</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Unordered list" }) %></th><td>* Item 1<br /> * Sub<br />* Item 2</td><td><ul><li>Item 1<ul><li>Sub</li></ul></li><li>Item 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Ordered list" }) %></th><td>1. Item 1<br /> 1. Sub<br />2. Item 2</td><td><ol><li>Item 1<ol><li>Sub</li></ol></li><li>Item 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Headings <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># Title 1</td><td><h1>Title 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## Title 2</td><td><h2>Title 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### Title 3</td><td><h3>Title 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link to a Wiki page" }) %></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
|
||||
<tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Inline images <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tables</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">More Information</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,341 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki formatting (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Links</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine links</a></li>
|
||||
<li><a href='#4'>External links</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Text formatting</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Font style</a></li>
|
||||
<li><a href='#7'>Inline images</a></li>
|
||||
<li><a href='#8'>Headings</a></li>
|
||||
<li><a href='#10'>Blockquotes</a></li>
|
||||
<li><a href='#11'>Table of content</a></li>
|
||||
<li><a href='#14'>Horizontal Rule</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Macros</a></li>
|
||||
<li><a href='#13'>Code highlighting</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Links</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine links</h3>
|
||||
|
||||
<p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
|
||||
<ul>
|
||||
<li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>You can also link to pages of an other project wiki:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
|
||||
<li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>Links to other resources:</p>
|
||||
|
||||
<ul>
|
||||
<li>Documents:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (link to document with id 17)</li>
|
||||
<li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
|
||||
<li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Versions:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (link to version with id 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Attachments:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
|
||||
<li>For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Changesets:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (link to a changeset)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
|
||||
<li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
|
||||
<li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository files:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
|
||||
<li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
|
||||
<li><strong>export:some/file</strong> (force the download of the file)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forums:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (link to forum with id 1</li>
|
||||
<li><strong>forum:Support</strong> (link to forum named Support)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Forum messages:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (link to message with id 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Projects:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (link to project with id 3)</li>
|
||||
<li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
|
||||
<li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>News:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (link to news item with id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Escaping:</p>
|
||||
|
||||
<ul>
|
||||
<li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>External links</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>displays: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>If you want to display a specific text instead of the URL, you can use the standard markdown syntax:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>displays: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Text formatting</h2>
|
||||
|
||||
|
||||
<p>For things such as headlines, bold, tables, lists, Redmine supports Markdown syntax. See <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Font style</h3>
|
||||
|
||||
<pre>
|
||||
* **bold**
|
||||
* *Italic*
|
||||
* ***bold italic***
|
||||
* _underline_
|
||||
* ~~strike-through~~
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>bold</strong></li>
|
||||
<li><em>italic</em></li>
|
||||
<li><em><strong>bold italic</strong></em></li>
|
||||
<li><u>underline</u></li>
|
||||
<li><del>strike-through</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Inline images</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> displays an image located at image_url (markdown syntax)</li>
|
||||
<li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong></strong></li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Headings</h3>
|
||||
|
||||
<pre>
|
||||
# Heading
|
||||
## Subheading
|
||||
### Subsubheading
|
||||
</pre>
|
||||
|
||||
<p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
|
||||
|
||||
<p>Start the paragraph with <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Table of content</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => left aligned toc
|
||||
{{>toc}} => right aligned toc
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Macros</h2>
|
||||
|
||||
<p>Redmine has the following builtin macros:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Sample macro.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Displays a list of all available macros, including description if available.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
|
||||
<pre><code>{{child_pages}} -- can be used from a wiki page only
|
||||
{{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Include a wiki page. Example:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>or to include a page of a specific project wiki:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Inserts of collapsed block of text. Example:</p>
|
||||
<pre><code>{{collapse(View details...)
|
||||
This is a block of text that is collapsed by default.
|
||||
It can be expanded by clicking a link.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Formatação Wiki</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Sintaxe Wiki - Referência Rápida (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Estilos de Fonte <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Strong" }) %></th><td style="width:50%;">**Negrito**</td><td style="width:50%;"><strong>Negrito</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Italic" }) %></th><td>*Itálico*</td><td><em>Itálico</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Underline" }) %></th><td>_Sublinhado_</td><td><ins>Sublinhado</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Deleted" }) %></th><td>~~Tachado~~</td><td><del>Tachado</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Inline code" }) %></th><td>`Código Inline`</td><td><code>Código Inline</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> linhas<br /> de código<br />```</td><td>
|
||||
<pre>
|
||||
linhas
|
||||
de código
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Highlighted code <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Highlighted code" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Listas</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Unordered list" }) %></th><td>* Item 1<br /> * Sub<br />* Item 2</td><td><ul><li>Item 1<ul><li>Sub</li></ul></li><li>Item 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Ordered list" }) %></th><td>1. Item 1<br /> 1. Sub<br />2. Item 2</td><td><ol><li>Item 1<ol><li>Sub</li></ol></li><li>Item 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Cabeçalhos <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># Título 1</td><td><h1>Título 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## Título 2</td><td><h2>Título 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### Título 3</td><td><h3>Título 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Links <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Links do Redmine <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link to a Wiki page" }) %></th><td>[[Página Wiki]]</td><td><a href="#">Página Wiki</a></td></tr>
|
||||
<tr><th></th><td>Tarefa #12</td><td>Tarefa <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: Título da tarefa</td></tr>
|
||||
<tr><th></th><td>Revisão r43</td><td>Revisão <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:algum/arquivo</td><td><a href="#">source:algum/arquivo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Imagens inline <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Tabelas</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">Mais Informações</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,341 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>விக்கி வடிவமைப்பு (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>இணைப்புகள்</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>ரெட்மைன் இணைப்புகளை</a></li>
|
||||
<li><a href='#4'>வெளி இணைப்புகள்</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>உரை வடிவமைப்பு</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>எழுத்துரு வகை</a></li>
|
||||
<li><a href='#7'>இன்லைன் படங்கள்</a></li>
|
||||
<li><a href='#8'>தலைப்புகள்</a></li>
|
||||
<li><a href='#10'>தொகுதிகள்</a></li>
|
||||
<li><a href='#11'>உள்ளடக்க அட்டவணை</a></li>
|
||||
<li><a href='#14'>கிடைமட்ட விதி</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>குறுநிரல்கள்</a></li>
|
||||
<li><a href='#13'>சிறப்பம்ச குறியீடு</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>இணைப்புகள்</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>ரெட்மைன் இணைப்புகள்</h3>
|
||||
|
||||
<p>ரெட்மைன் வளங்களுக்கு இடையில் ஹைப்பர்லிங்கை அனுமதிக்கிறது (சிக்கல்கள், மாற்றங்கள், விக்கி பக்கங்கள்...) எங்கிருந்தும் விக்கி வடிவமைத்தல் பயன்படுத்தப்படுகிறது.</p>
|
||||
<ul>
|
||||
<li>ஒரு சிக்கலுக்கான இணைப்பு: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, சிக்கல் மூடப்பட்டால் இணைப்பு அடித்திருக்கும்)</li>
|
||||
<li>தடம் பெயர் மற்றும் பொருள் உள்ளிட்ட சிக்கலுக்கான இணைப்பு: <strong>##124</strong> (காட்சிகள்<a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>சிக்கல் குறிப்பிற்கான இணைப்பு: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>அதே சிக்கலுக்குள் ஒரு சிக்கல் குறிப்புடன் இணைக்கவும்: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki links:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[வழிகாட்டி]]</strong> 'கையேடு' பக்கத்திற்கான இணைப்பு : <a href="#" class="wiki-page">வழிகாட்டி</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> உங்களை "மேலும் படிக்க" இணைப்புக்கு அழைத்துச் செல்லும் . தலைப்புகள் தானாக இணைப்பை பெறுவதால் அவற்றைக் குறிப்பிடலாம் : <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> தற்போதைய பக்கத்தின் "மேலும் படிக்க" இணைப்பு : <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[வழிகாட்டி|பயனர் கையேடு]]</strong> ஒரே பக்கத்திற்கான இணைப்பைக் காட்டுகிறது, ஆனால் வேறு உரையுடன்: <a href="#" class="wiki-page">பயனர் கையேடு</a></li>
|
||||
</ul>
|
||||
|
||||
<p>நீங்கள் வேறு திட்ட விக்கியின் பக்கங்களுக்கும் இணைக்கலாம்:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:சில பக்கம்]]</strong> Sandbox விக்கியின் 'Some page' பக்கத்தின் இணைப்பு </li>
|
||||
<li><strong>[[sandbox:]]</strong> Sandbox விக்கியின் பிரதான பக்கத்தின் இணைப்பு</li>
|
||||
</ul>
|
||||
|
||||
<p>பக்கம் இன்னும் இல்லையென்றால் விக்கி இணைப்புகள் சிவப்பு நிறத்தில் காட்டப்படும், eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>பிற ஆவணங்களின் இணைப்புகள்:</p>
|
||||
|
||||
<ul>
|
||||
<li>ஆவணங்கள்:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (17 ஆம் ஆவணத்திற்கான இணைப்பு)</li>
|
||||
<li><strong>document:Greetings</strong> ("Greetings" தலைப்புடன் ஆவண இணைப்பு)</li>
|
||||
<li><strong>document:"சில ஆவணம்"</strong> (ஆவண தலைப்பில் இடைவெளிகள் இருக்கும்போது இரட்டை மேற்கோள்களைப் பயன்படுத்தலாம்)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> ("sandbox" திட்டத்தின் "Some document" தலைப்புடன் ஆவண இணைப்பு )</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>பதிப்புகள்:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (3 ஆம் பதிப்பின் இணைப்பு)</li>
|
||||
<li><strong>version:1.0.0</strong> (1.0.0" பதிப்பின் இணைப்பு)</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> ("sandbox" திட்டத்தின் "1.0.0" பதிப்பிற்கான இணைப்பு )</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Attachments:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (file.zip இணைப்புக்கான இணைப்பு )</li>
|
||||
<li>இப்போதைக்கு, தற்போதைய பொருளின் இணைப்புகளை மட்டுமே குறிப்பிட முடியும் (நீங்கள் ஒரு சிக்கலில் இருந்தால், இந்த சிக்கலின் இணைப்புகளை மட்டுமே குறிப்பிட முடியும்)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>மாற்றங்கள்:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (மாற்றத்திற்கான இணைப்பு)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (எண் அல்லாத ஹாஷ் கொண்ட மாற்றத்திற்கான இணைப்பு)</li>
|
||||
<li><strong>svn1|r758</strong> (பல களஞ்சியங்களைக் கொண்ட திட்டங்களுக்கு, ஒரு குறிப்பிட்ட களஞ்சியத்தின் மாற்றத்திற்கான இணைப்பு)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (ஒரு குறிப்பிட்ட களஞ்சியத்தின் எண் அல்லாத ஹாஷுடன் ஒரு மாற்றத்திற்கான இணைப்பு)</li>
|
||||
<li><strong>sandbox:r758</strong> (மற்றொரு திட்டத்தின் மாற்றத்திற்கான இணைப்பு)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (மற்றொரு திட்டத்தின் எண் அல்லாத ஹாஷுடன் ஒரு மாற்றத்திற்கான இணைப்பு)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Repository files:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (திட்டத்தின் களஞ்சியத்தில் / சில / கோப்பில் அமைந்துள்ள கோப்பிற்கான இணைப்பு)</li>
|
||||
<li><strong>source:some/file@52</strong> (கோப்பின் திருத்தம் 52 உடன் இணைப்பு)</li>
|
||||
<li><strong>source:some/file#L120</strong> (கோப்பின் 120 வது வரியுடன் இணைக்கவும்)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (கோப்பின் திருத்தம் 52 இன் 120 வது வரியின் இணைப்பு)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (URL இடைவெளிகளைக் கொண்டிருக்கும்போது இரட்டை மேற்கோள்களைப் பயன்படுத்தவும்)</li>
|
||||
<li><strong>export:some/file</strong> (கோப்பைப் பதிவிறக்க கட்டாயப்படுத்தவும்)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (பல களஞ்சியங்களைக் கொண்ட திட்டங்களுக்கு, ஒரு குறிப்பிட்ட களஞ்சியத்தின் கோப்பிற்கான இணைப்பு)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (திட்டத்தின் களஞ்சியத்தில் / சில / கோப்பில் அமைந்துள்ள கோப்பிற்கான இணைப்பு "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (கோப்பைப் பதிவிறக்க கட்டாயப்படுத்தவும்)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>மன்றங்கள்:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (1 ஆம் மன்றத்திற்கான இணைப்பு</li>
|
||||
<li><strong>forum:Support</strong> (ஆதரவு என்ற மன்றத்திற்கான இணைப்பு)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (மன்றத்தின் பெயரில் இடைவெளிகள் இருந்தால் இரட்டை மேற்கோள்களைப் பயன்படுத்தவும்)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>கருத்துக்களம் பதிவுகள்:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (1218 ஆம் செய்திக்கான இணைப்பு)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>திட்டங்கள்:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (3 ஆம் திட்டத்திற்கான இணைப்பு)</li>
|
||||
<li><strong>project:some-project</strong> (பெயர் அல்லது slug மூலம் திட்டத்திற்கான இணைப்பு "சில திட்டம்"")</li>
|
||||
<li><strong>project:"Some Project"</strong> (இடைவெளிகளைக் கொண்ட திட்ட பெயருக்கு இரட்டை மேற்கோள்களைப் பயன்படுத்தவும்)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>செய்தி:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (2 ஆம் செய்தியின் இணைப்பு)</li>
|
||||
<li><strong>news:Greetings</strong> ("வாழ்த்துக்கள்" செய்திக்கான இணைப்பு)</li>
|
||||
<li><strong>news:"First Release"</strong> (செய்தி உருப்படி பெயரில் இடைவெளிகள் இருந்தால் இரட்டை மேற்கோள்களைப் பயன்படுத்தவும்)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>பயனர்கள்:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (2 ஆம் பயனர் இணைப்பு)</li>
|
||||
<li><strong>user:jsmith</strong> (உள்நுழைவு jsmith உடன் பயனருக்கான இணைப்பு)</li>
|
||||
<li><strong>@jsmith</strong> (உள்நுழைவு jsmith உடன் பயனருக்கான இணைப்பு)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>தப்பித்தல்:</p>
|
||||
|
||||
<ul>
|
||||
<li>ரெட்மைன் இணைப்புகள் ஆச்சரியக்குறியுடன் அவற்றை பாகுபடுத்துவதைத் தடுக்கலாம்: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>வெளி இணைப்புகள்</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) மின்னஞ்சல் முகவரிகள் தானாக கிளிக் செய்யக்கூடிய இணைப்புகளாக மாற்றப்படும்:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>காட்சிகள்: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>URL க்கு பதிலாக ஒரு குறிப்பிட்ட உரையைக் காட்ட விரும்பினால், நீங்கள் நிலையான மார்க் டவுன் தொடரியல் பயன்படுத்தலாம்:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>காட்சிகள்: <a href="https://www.redmine.org" class="external">ரெட்மைன் வலைத்தளம்</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>உரை வடிவமைத்தல்</h2>
|
||||
|
||||
|
||||
<p>தலைப்புச் செய்திகள், தடித்த, அட்டவணைகள், பட்டியல்கள் போன்ற விஷயங்களுக்கு, ரெட்மைன் மார்க் டவுன் தொடரியல் ஆதரிக்கிறது. See <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> இந்த அம்சங்களில் ஏதேனும் ஒன்றைப் பயன்படுத்துவது பற்றிய தகவலுக்கு. ஒரு சில மாதிரிகள் கீழே சேர்க்கப்பட்டுள்ளன, ஆனால் இயந்திரம் அதைவிட அதிக திறன் கொண்டது.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>எழுத்துரு வகை</h3>
|
||||
|
||||
<pre>
|
||||
* **வலுவான**
|
||||
* *சாய்வு*
|
||||
* ***தைரியமான சாய்வு***
|
||||
* _அடிக்கோடிட்டுக் காட்டு_
|
||||
* ~~வேலைநிறுத்தம் மூலம்~~
|
||||
</pre>
|
||||
|
||||
<p>காட்சி:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>வலுவான</strong></li>
|
||||
<li><em>சாய்வு</em></li>
|
||||
<li><em><strong>தைரியமான சாய்வு</strong></em></li>
|
||||
<li><u>அடிக்கோடிட்டுக் காட்டு</u></li>
|
||||
<li><del>வேலைநிறுத்தம் மூலம்</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>இன்லைன் படங்கள்</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> image_url இல் அமைந்துள்ள ஒரு படத்தைக் காட்டுகிறது (மார்க் டவுன் தொடரியல்)</li>
|
||||
<li>உங்கள் விக்கி பக்கத்தில் ஒரு படம் இணைக்கப்பட்டிருந்தால், அதன் கோப்பு பெயரைப் பயன்படுத்தி இன்லைனில் காட்டப்படும்: <strong></strong></li>
|
||||
<li>உங்கள் கணினியின் கிளிப்போர்டில் உள்ள படங்களை நேரடியாக Ctrl-v அல்லது Command-v ஐப் பயன்படுத்தி ஒட்டலாம்(இன்டர்நெட் எக்ஸ்ப்ளோரர் ஆதரிக்கப்படவில்லை என்பதை நினைவில் கொள்க).</li>
|
||||
<li>படக் கோப்புகளை பதிவேற்ற மற்றும் உட்பொதிக்க உரை பகுதிக்கு இழுக்கலாம்.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>தலைப்புகள்</h3>
|
||||
|
||||
<pre>
|
||||
# தலைப்பு
|
||||
## துணை தலைப்பு
|
||||
### துணை தலைப்பு
|
||||
</pre>
|
||||
|
||||
<p>ரெட்மைன் அந்த ஒவ்வொரு தலைப்பிற்கும் ஒரு நங்கூரத்தை ஒதுக்குகிறது, இதனால் நீங்கள் அவற்றுடன் இணைக்க முடியும் "#தலைப்பு"", "#துணை தலைப்பு" மற்றும் முன்னும் பின்னுமாக.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>தொகுதிகள்</h3>
|
||||
|
||||
<p>உடன் பத்தியைத் தொடங்குங்கள் <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> ரெயில்ஸ் என்பது மாடல்-வியூ-கண்ட்ரோல் முறைக்கு ஏற்ப தரவுத்தள ஆதரவுடைய வலை பயன்பாடுகளை உருவாக்குவதற்கான முழு அடுக்கு கட்டமைப்பாகும்.
|
||||
நேரலைக்குச் செல்ல, நீங்கள் சேர்க்க வேண்டியது தரவுத்தளம் மற்றும் வலை சேவையகம் மட்டுமே.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>ரெயில்ஸ் என்பது மாடல்-வியூ-கண்ட்ரோல் முறைக்கு ஏற்ப தரவுத்தள ஆதரவுடைய வலை பயன்பாடுகளை உருவாக்குவதற்கான முழு அடுக்கு கட்டமைப்பாகும்.<br />நேரலைக்குச் செல்ல, நீங்கள் சேர்க்க வேண்டியது தரவுத்தளம் மற்றும் வலை சேவையகம் மட்டுமே.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>உள்ளடக்க அட்டவணை</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => இடது சீரமைக்கப்பட்ட உள்ளடக்க அட்டவணை
|
||||
{{>toc}} => வலது சீரமைக்கப்பட்ட உள்ளடக்க அட்டவணை
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>கிடைமட்ட விதி</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>குறுநிரல்கள்</h2>
|
||||
|
||||
<p>ரெட்மைனில் பின்வரும் பில்டின் குறுநிரல்கள் உள்ளன:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>மாதிரி குறுநிரல்.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>விளக்கம் கிடைத்தால் உட்பட, கிடைக்கக்கூடிய அனைத்து மேக்ரோக்களின் பட்டியலையும் காட்டுகிறது.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>கீழ் பக்கங்களின் பட்டியலைக் காட்டுகிறது. எந்த வாதமும் இல்லாமல், இது தற்போதைய விக்கி பக்கத்தின் கீழ் பக்கங்களைக் காட்டுகிறது. எடுத்துக்காட்டுகள்:</p>
|
||||
<pre><code>{{child_pages}} -- விக்கி பக்கத்திலிருந்து மட்டுமே பயன்படுத்த முடியும்
|
||||
{{child_pages(depth=2)}} -- 2 நிலைகள் கூடுகளை மட்டும் காண்பி</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>விக்கி பக்கத்தைச் சேர்க்கவும். எடுத்துக்காட்டுகள்:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>அல்லது ஒரு குறிப்பிட்ட திட்ட விக்கியின் பக்கத்தை சேர்க்க:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>சுருங்கிய தொகுதியின் செருகல்கள். எடுத்துக்காட்டுகள்:</p>
|
||||
<pre><code>{{collapse(விபரங்களை பார்...)
|
||||
இது முன்னிருப்பாக சரிந்த உரையின் தொகுதி.
|
||||
இணைப்பைக் கிளிக் செய்வதன் மூலம் அதை விரிவாக்க முடியும்.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>இணைக்கப்பட்ட படத்தின் கிளிக் செய்யக்கூடிய சிறுபடத்தைக் காட்டுகிறது. எடுத்துக்காட்டுகள்:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=சிறுபடம்)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>நெகிழ்வான உரையுடன் சிக்கலுக்கான இணைப்பைச் செருகும். எடுத்துக்காட்டுகள்:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>குறியீடு சிறப்பம்சமாக</h2>
|
||||
|
||||
<p>இயல்புநிலை குறியீடு சிறப்பம்சத்தை நம்பியுள்ளது <a href="https://rouge.jneen.net/" class="external">Rouge</a>, தூய ரூபியில் எழுதப்பட்ட ஒரு தொடரியல் சிறப்பம்சமாக நூலகம். It supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages, where the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>இந்த தொடரியல் பயன்படுத்தி விக்கி வடிவமைப்பை ஆதரிக்கும் எந்த இடத்திலும் குறியீட்டை முன்னிலைப்படுத்தலாம் (மொழி பெயர் அல்லது மாற்று வழக்கு-உணர்வற்றது என்பதை நினைவில் கொள்க):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
உங்கள் குறியீட்டை இங்கே வைக்கவும்.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>எடுத்துக்காட்டுகள்:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki formatting</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>விக்கி தொடரியல் விரைவு குறிப்பு (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">எழுத்துரு பாங்குகள் <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">மேலும்</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Strong" }) %></th><td style="width:50%;">**வலுவான**</td><td style="width:50%;"><strong>வலுவான</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Italic" }) %></th><td>*சாய்வு*</td><td><em>சாய்வு</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/underline.svg", { alt: "Underline" }) %></th><td>_அடிக்கோடிட்டு_</td><td><ins>அடிக்கோடிட்டு</ins></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Deleted" }) %></th><td>~~நீக்கப்பட்டது~~</td><td><del>நீக்கப்பட்டது</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Inline code" }) %></th><td>`இன்லைன் குறியீடு`</td><td><code>இன்லைன் குறியீடு</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> கோடுகள்<br /> குறியீடு<br />```</td><td>
|
||||
<pre>
|
||||
கோடுகள்
|
||||
குறியீடு
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">சிறப்பம்சமாக குறியீடு <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">மேலும்</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Highlighted code" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">பட்டியல்கள்</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Unordered list" }) %></th><td>* பொருள் 1<br /> * துணை<br />* பொருள் 2</td><td><ul><li>பொருள் 1<ul><li>துணை</li></ul></li><li>பொருள் 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Ordered list" }) %></th><td>1. பொருள் 1<br /> 1. துணை<br />2. பொருள் 2</td><td><ol><li>பொருள் 1<ol><li>துணை</li></ol></li><li>பொருள் 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">தலைப்புகள்<span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">மேலும்</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Heading 1" }) %></th><td># தலைப்பு 1</td><td><h1>தலைப்பு 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Heading 2" }) %></th><td>## தலைப்பு 2</td><td><h2>தலைப்பு 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Heading 3" }) %></th><td>### தலைப்பு 3</td><td><h3>தலைப்பு 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">இணைப்புகள் <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">மேலும்</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine இணைப்புகள் <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">மேலும்</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Link to a Wiki page" }) %></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
|
||||
<tr><th></th><td>சிக்கல்கள் #12</td><td>சிக்கல்கள் <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>திருத்தம் r43</td><td>திருத்தம் <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">இன்லைன் படங்கள் <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">மேலும</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">அட்டவணை</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">மேலும் தகவல்</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,339 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>Redmine - форматування вікі сторінок (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Форматування вікі сторінок (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>Лінки(посилання)</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine лінки(посилання)</a></li>
|
||||
<li><a href='#4'>Зовнішні посилання</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>Форматування тексту</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>Стиль шрифту</a></li>
|
||||
<li><a href='#7'>Вбудовані(inline) зображення</a></li>
|
||||
<li><a href='#8'>Заголовоки</a></li>
|
||||
<li><a href='#10'>Цитати</a></li>
|
||||
<li><a href='#11'>Таблиці змісту сторінки</a></li>
|
||||
<li><a href='#14'>Горизонтальна лінія</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>Макроси</a></li>
|
||||
<li><a href='#13'>Підсвітка синтаксису коду</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>Лінки(посилання)</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine лінки(посилання)</h3>
|
||||
|
||||
<p>Redmine дозволяє гіперпосилання між ресурсами (завданнями, змінами, вікі-сторінками ...) з будь-якого місця, де використовується вікі-форматування.</p>
|
||||
<ul>
|
||||
<li>Посилання на завдання: <strong>#124</strong> (Відображає <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, посилання закресленим, якщо завдання закрите)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>Посилання на примітку до завдання: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Вікі посилання:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Керівництво користувача]]</strong> відображає посилання на сторінку під назвою 'Керівництво користувача': <a href="#" class="wiki-page">Керівництво користувача</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> приведе вас до якоря "further-reading". Заголовкам автоматично призначаються якоря так, що Ви можете звернутися до них: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> відображає посилання на ту ж саму сторінку, але з іншим текстом: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Ви також можете посилатися на сторінки з вікі іншого проекту:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> відображає посилання на сторінку з назвою 'Some page' з вікі Sandbox</li>
|
||||
<li><strong>[[sandbox:]]</strong> відображає посилання на головну сторінку вікі Sandbox</li>
|
||||
</ul>
|
||||
|
||||
<p>Вікі посилання відображаються червоним кольором, якщо сторінка ще не існує: <a href="#" class="wiki-page new">Неіснуюча сторінка</a>.</p>
|
||||
|
||||
<p>Посилання на інші ресурси:</p>
|
||||
|
||||
<ul>
|
||||
<li>Документи:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (посилання на документ з id 17)</li>
|
||||
<li><strong>document:Привітання</strong> (посилання на документ з заголовком "Привітання")</li>
|
||||
<li><strong>document:"Деякий документ"</strong> (подвійні лапки можна використовувати, якщо заголовок документа містить пропуски)</li>
|
||||
<li><strong>sandbox:document:"Деякий документ"</strong> (посилання на документ з заголовком "Деякий документ" з іншого проекту "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Версії:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (посилання на версію з id 3)</li>
|
||||
<li><strong>version:1.0.0</strong> (посилання на версію з назвою "1.0.0")</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong></li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (посилання на версію "1.0.0" з проекту "sandbox")</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Вкладенні файли:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (посилання на вкладенний файл з ім'ям file.zip)</li>
|
||||
<li>На даний момент можливо посилатись тільки на вкладення з поточного об'єкту (якщо ви працюєте з завданням, ви можете посилатись тільки на вкладення поточного завдання)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Зміни:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (посилання на зміни)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (посилання на зміни з нечисловим хешем)</li>
|
||||
<li><strong>svn1|r758</strong> (посилання на зміни вказаного сховища(репозиторія), для проектів з декількома сховищами(репозиторіями))</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (посилання на зміни з нечисловим хешем вказаного репозиторія)</li>
|
||||
<li><strong>sandbox:r758</strong> (посилання на зміни іншого проекту)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (посилання на зміни з нечисловим іншого проекту)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Файли у сховищах(репозиторіях):
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (посилання на файл за шляхом /some/file у сховищі проекту)</li>
|
||||
<li><strong>source:some/file@52</strong> (посилання на file з ревізії 52)</li>
|
||||
<li><strong>source:some/file#L120</strong> (посилання на рядок 120 з file)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (посилання на рядок 120 з file ревізії 52)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (використовуте подвійні лапки у випадках, коли URL містить пропуски</li>
|
||||
<li><strong>export:some/file</strong> (примусове завантаження файлу file)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (посилання на file вказаного сховища, для проектів в яких використовується декілька сховищь)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (посилання на файл за шляхом /some/file з сховища проекту "sandbox")</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (примусове завантаження файлу file)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Форуми:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (посилання на форум з id 1</li>
|
||||
<li><strong>forum:Support</strong> (посилання на форум з назвою Support)</li>
|
||||
<li><strong>forum:"Технічна підтримка"</strong> (використовуте подвійні лапки у випадках, коли назва форуму містить пропуски)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Повідомленя на форумах:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (посилання на повідомлення з id 1218)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Проекти:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (посилання на проект з id 3)</li>
|
||||
<li><strong>project:some-project</strong> (посилання на проект з назвою або ідентифікатором "some-project")</li>
|
||||
<li><strong>project:"Some Project"</strong> (використовуте подвійні лапки у випадках, коли назва проекту містить пропуски))</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Новини:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (посилання на новину з id 2)</li>
|
||||
<li><strong>news:Greetings</strong> (посилання на новину з заголовком "Greetings")</li>
|
||||
<li><strong>news:"First Release"</strong> (використовуте подвійні лапки у випадках, коли назва новини містить пропуски)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Запобігання перетворенню(escaping):</p>
|
||||
|
||||
<ul>
|
||||
<li>Ви можете запобігти, щоб Redmine перетворював посилання, поставивши перед посиланням знак оклику: !</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>Зовнішні посилання</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>відображаються як: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>Якщо ви хочете, відобразити текст замість URL, ви можете використовувати стандартний markdown синтаксис:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>відображається як: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>Форматування тексту</h2>
|
||||
|
||||
|
||||
<p>Для таких речей як: заголовки, жирний текст, таблиці, списки, Redmine підтримує Markdown синтаксис. Перегляньте <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> для отримання інформації як цим користуватись. Нижче наводиться декілька прикладів, але можливості Markdown набагато більщі ніж у наведених прикладах.</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>Стиль шрифту</h3>
|
||||
|
||||
<pre>
|
||||
* **Жирний**
|
||||
* *Курсив*
|
||||
* ***Жирний курсив***
|
||||
* ~~Закреслений~~
|
||||
</pre>
|
||||
|
||||
<p>Відображення:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Жирний</strong></li>
|
||||
<li><em>Курсив</em></li>
|
||||
<li><em><strong>Жирний курсив</strong></em></li>
|
||||
<li><del>Закреслений</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>Вбудовані(inline) зображення</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> виводить зображення, розташоване за адресою image_url (markdown синтаксис)</li>
|
||||
<li><strong></strong> зображення яке додане до вашої сторінки вікі, може бути відображено, з використанням ім'я файлу</li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>Заголовоки</h3>
|
||||
|
||||
<pre>
|
||||
# Заголовок
|
||||
## Підзаголовок
|
||||
### Підзаголовок
|
||||
</pre>
|
||||
|
||||
<p>Redmine призначає якір кожному з цих заголовків, таким чином, ви можете посилатись на них з "#Заголовок", "#Підзаголовок" і так далі.</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>Цитати</h3>
|
||||
|
||||
<p>Почніть параграф з <strong>></strong></p>
|
||||
|
||||
<pre>
|
||||
> Redmine — серверний веб-додаток з відкритим кодом для управління проектами та відстежування помилок. До системи входить календар-планувальник та діаграми Ганта
|
||||
для візуального представлення ходу робіт за проектом та строків виконання.
|
||||
</pre>
|
||||
|
||||
<p>Відображається:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Redmine — серверний веб-додаток з відкритим кодом для управління проектами та відстежування помилок. До системи входить календар-планувальник та діаграми Ганта</br> для візуального представлення ходу робіт за проектом та строків виконання.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>Таблиці змісту сторінки</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => left aligned toc
|
||||
{{>toc}} => right aligned toc
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>Горизонтальна лінія</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>Макроси</h2>
|
||||
|
||||
<p>Redmine має наступні вбудовані макроси:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>Приклад макросу.</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>Відображає список всіх доступних макросів, в тому числі опис, якщо такий є.</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>Відображає список дочірніх сторінок. Без аргументів, він відображає дочірні сторінки поточної сторінки вікі. Приклад:</p>
|
||||
<pre><code>{{child_pages}} -- може бути використаний тільки на вікі-сторінці
|
||||
{{child_pages(depth=2)}} -- відображає тільки 2 рівня вкладень</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>Вставити вікі-сторінку. Приклад:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>або вставити сторінку з конкретного проекту вікі:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>Втавте блок тексту, який має з'являтись при натисканні на "Детальніше...". Приклад:</p>
|
||||
<pre><code>{{collapse(Детальніше...)
|
||||
Це блок тексту прихований по замовчуванню.
|
||||
Його можливо показати натиснувши на посилання
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>Відображає інтерактивні мініатюри вкладеного зображення. Приклади:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>Підсвітка синтаксису коду</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>Ви можете виділити підсвіткою код в будь-якому місці, яке підтримує вікі-форматування, використовуючи наступний синтаксис (зверніть увагу, що назва мови або псевдонім не чутливі до регістру):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
Place your code here.
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>Приклад:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Вікі синтаксис (Markdown)</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Вікі синтаксис швидка підказка (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">Cтилі шрифтів <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "Жирний" }) %></th><td style="width:50%;">**Жирний**</td><td style="width:50%;"><strong>Жирний</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "Курсив" }) %></th><td>*Курсив*</td><td><em>Курсив</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "Закреслений" }) %></th><td>~~Закреслений~~</td><td><del>Закреслений</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "Інлайн код" }) %></th><td>`Інлайн код`</td><td><code>Інлайн код</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> Попередньо<br /> відформатований<br /> текст<br />```</td><td>
|
||||
<pre>
|
||||
Попередньо
|
||||
відформатований
|
||||
текст
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">иділений код <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "Виділений код" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">Списки</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "Ненумерованний список" }) %></th><td>* Пункт<br /> * Підпункт<br />* Пункт</td><td><ul><li>Пункт<ul><li>Підпункт</li></ul></li><li>Пункт</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "Нумерований список" }) %></th><td>1. Пункт<br /> 1. Підпункт<br />2. Пункт</td><td><ol><li>Пункт<ol><li>Підпункт</li></ol></li><li>Пункт</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">Заголовоки <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "Заголовок 1" }) %></th><td># Заголовок 1</td><td><h1>Заголовок 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "Заголовок 2" }) %></th><td>## Заголовок 2</td><td><h2>Заголовок 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "Заголовок 3" }) %></th><td>### Заголовок 3</td><td><h3>Заголовок 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">Лінки(посилання) <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine посилання <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "Посилання на вікі сторінку" }) %></th><td>[[Вікі сторінка]]</td><td><a href="#">Вікі сторінка</a></td></tr>
|
||||
<tr><th></th><td>Завдання #12</td><td>Завдання <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Вбудовані(inline) зображення <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "Image" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">Таблиці</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">Детальніша інформація</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,339 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>RedmineWikiFormatting (Markdown)</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "wiki_syntax_detailed.css" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a name="1" class="wiki-page"></a>Wiki 格式設定 (Markdown)</h1>
|
||||
|
||||
<ul class='toc'>
|
||||
<li><a href='#2'>連結</a></li>
|
||||
<ul>
|
||||
<li><a href='#3'>Redmine 連結</a></li>
|
||||
<li><a href='#4'>外部連結</a></li>
|
||||
</ul>
|
||||
<li><a href='#5'>文字格式設定</a></li>
|
||||
<ul>
|
||||
<li><a href='#6'>字型樣式</a></li>
|
||||
<li><a href='#7'>內嵌圖像</a></li>
|
||||
<li><a href='#8'>標題</a></li>
|
||||
<li><a href='#10'>區塊引述</a></li>
|
||||
<li><a href='#11'>目錄</a></li>
|
||||
<li><a href='#14'>水平線</a></li>
|
||||
</ul>
|
||||
<li><a href='#12'>巨集</a></li>
|
||||
<li><a href='#13'>程式碼醒目提示</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="2" class="wiki-page"></a>連結</h2>
|
||||
|
||||
<h3><a name="3" class="wiki-page"></a>Redmine 連結</h3>
|
||||
|
||||
<p>在任何可以使用 Wiki 格式設定的地方, Redmine 都允許在資源 (議題、變更集、 Wiki 頁面...) 間建立超連結。</p>
|
||||
<ul>
|
||||
<li>連結至一個議題: <strong>#124</strong> (若該議題已經結束,則使用刪除線顯示連結: <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>)</li>
|
||||
<li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
|
||||
<li>連結至一個議題的筆記: <strong>#124-6</strong>, 或 <strong>#124#note-6</strong></li>
|
||||
<li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Wiki 連結:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[Guide]]</strong> 顯示一個頁面名稱為 'Guide' 的連結: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[Guide#further-reading]]</strong> 會顯示連結至一個 "further-reading" 的 HTML 錨定 (anchor) 。每個標題文字都會被自動指定一個 HTML 錨定,以便您可以用來連結它們: <a href="#" class="wiki-page">Guide</a></li>
|
||||
<li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
|
||||
<li><strong>[[Guide|User manual]]</strong> 使用不同的文字來顯示一個頁面名稱為 'Guide' 的連結: <a href="#" class="wiki-page">User manual</a></li>
|
||||
</ul>
|
||||
|
||||
<p>您也可以連結至其他專案的 Wiki 頁面:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>[[sandbox:some page]]</strong> 顯示一個 Sanbox wiki 中頁面名稱為 'Some page' 的連結</li>
|
||||
<li><strong>[[sandbox:]]</strong> 顯示 Sandbox wiki 首頁頁面的連結</li>
|
||||
</ul>
|
||||
|
||||
<p>當頁面不存在的時候, Wiki 連結會以紅色的方式顯示,例如: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
|
||||
|
||||
<p>連結至其他資源:</p>
|
||||
|
||||
<ul>
|
||||
<li>文件:
|
||||
<ul>
|
||||
<li><strong>document#17</strong> (連結到編號為 17 的文件)</li>
|
||||
<li><strong>document:Greetings</strong> (連結至文件標題為 "Greetings" 的文件)</li>
|
||||
<li><strong>document:"Some document"</strong> (文件標題包含空白字元時可以使用雙引號來標示)</li>
|
||||
<li><strong>sandbox:document:"Some document"</strong> (連結至另外一個 "sandbox" 專案中,文件標題為 "Some document" 的文件)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>版本:
|
||||
<ul>
|
||||
<li><strong>version#3</strong> (連結至編號為 3 的版本)</li>
|
||||
<li><strong>version:1.0.0</strong> 連結至名稱為 "1.0.0" 的版本</li>
|
||||
<li><strong>version:"1.0 beta 2"</strong> (版本名稱包含空白字元時可以使用雙引號來標示)</li>
|
||||
<li><strong>sandbox:version:1.0.0</strong> (連結至 "sandbox" 專案中,名稱為 "1.0.0" 的版本)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>附加檔案:
|
||||
<ul>
|
||||
<li><strong>attachment:file.zip</strong> (連結至目前物件中,名稱為 file.zip 的附加檔案)</li>
|
||||
<li>目前僅提供參考到目前物件中的附加檔案 (若您正位於一個議題中,僅可參考位於此議題中之附加檔案)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>變更集:
|
||||
<ul>
|
||||
<li><strong>r758</strong> (連結至一個變更集)</li>
|
||||
<li><strong>commit:c6f4d0fd</strong> (使用雜湊碼連結至一個變更集)</li>
|
||||
<li><strong>svn1|r758</strong> (連結至指定儲存機制中之變更集,用於專案使用多個儲存機制時之情況)</li>
|
||||
<li><strong>commit:hg|c6f4d0fd</strong> (使用某特定儲存機制中的雜湊碼連結至一個變更集)</li>
|
||||
<li><strong>sandbox:r758</strong> (連結至其他專案的變更集)</li>
|
||||
<li><strong>sandbox:commit:c6f4d0fd</strong> (使用其他專案的雜湊碼連結至一個變更集)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>儲存機制中之檔案:
|
||||
<ul>
|
||||
<li><strong>source:some/file</strong> (連結至專案儲存機制中,位於 /some/file 的檔案)</li>
|
||||
<li><strong>source:some/file@52</strong> (連結至該檔案的 52 版次)</li>
|
||||
<li><strong>source:some/file#L120</strong> (連結至該檔案的第 120 行)</li>
|
||||
<li><strong>source:some/file@52#L120</strong> (連結至該檔案的 52 版次中之第 120 行)</li>
|
||||
<li><strong>source:"some file@52#L120"</strong> (當 URL 中包含空白字元時,使用雙引號來標示)</li>
|
||||
<li><strong>export:some/file</strong> (強制下載該檔案)</li>
|
||||
<li><strong>source:svn1|some/file</strong> (連結至指定儲存機制中的該檔案,用於專案使用多個儲存機制時之情況)</li>
|
||||
<li><strong>sandbox:source:some/file</strong> (連結至 "sandbox" 專案的儲存機制中,位於 /some/file 的檔案)</li>
|
||||
<li><strong>sandbox:export:some/file</strong> (強制下載該檔案)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>論壇:
|
||||
<ul>
|
||||
<li><strong>forum#1</strong> (連結至編號為 1 的論壇)</li>
|
||||
<li><strong>forum:Support</strong> (連結至名稱為 Support 的論壇)</li>
|
||||
<li><strong>forum:"Technical Support"</strong> (當論壇名稱中包含空白字元時,使用雙引號來標示)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>論壇訊息:
|
||||
<ul>
|
||||
<li><strong>message#1218</strong> (連結至編號為 1218 的訊息)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>專案:
|
||||
<ul>
|
||||
<li><strong>project#3</strong> (連結至編號為 3 的專案)</li>
|
||||
<li><strong>project:some-project</strong> (連結至名稱為 "someproject" 的專案)</li>
|
||||
<li><strong>project:"Some Project"</strong> (當專案名稱中包含空白字元時,使用雙引號來標示)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>新聞:
|
||||
<ul>
|
||||
<li><strong>news#2</strong> (連結至編號為 2 的新聞項目)</li>
|
||||
<li><strong>news:Greetings</strong> (連結至名稱為 "Greetings" 的新聞項目)</li>
|
||||
<li><strong>news:"First Release"</strong> (當新聞項目名稱中包含空白字元時,使用雙引號來標示)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>Users:
|
||||
<ul>
|
||||
<li><strong>user#2</strong> (link to user with id 2)</li>
|
||||
<li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
|
||||
<li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>逸出字元:</p>
|
||||
|
||||
<ul>
|
||||
<li>您可以在文字的前面加上驚嘆號 (!) 來避免該文字被剖析成 Redmine 連結</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="4" class="wiki-page"></a>外部連結</h3>
|
||||
|
||||
<p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
|
||||
|
||||
<pre>
|
||||
https://www.redmine.org, someone@foo.bar
|
||||
</pre>
|
||||
|
||||
<p>會顯示成: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
|
||||
|
||||
<p>若您想要顯示指定的文字而非該 URL ,您可以使用下列標準的 markdown 語法:</p>
|
||||
|
||||
<pre>
|
||||
[Redmine web site](https://www.redmine.org)
|
||||
</pre>
|
||||
|
||||
<p>會顯示成: <a href="https://www.redmine.org" class="external">Redmine web site</a></p>
|
||||
|
||||
|
||||
<h2><a name="5" class="wiki-page"></a>文字格式設定</h2>
|
||||
|
||||
|
||||
<p>對於諸如標題、粗體、表格、清單等項目, Redmine 支援使用 Markdown 語法。 可參考 <a class="external" href="https://daringfireball.net/projects/markdown/syntax">https://daringfireball.net/projects/markdown/syntax</a> 中關於使用這些格式化功能的說明資訊。 下面包含了一些使用範例,但格式化引擎的處理能力遠多於這些簡單的使用範例。</p>
|
||||
|
||||
<h3><a name="6" class="wiki-page"></a>字型樣式</h3>
|
||||
|
||||
<pre>
|
||||
* **粗體**
|
||||
* *斜體*
|
||||
* ***粗斜體***
|
||||
* ~~刪除線~~
|
||||
</pre>
|
||||
|
||||
<p>會顯示成:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>粗體</strong></li>
|
||||
<li><em>斜體</em></li>
|
||||
<li><em><strong>粗斜體</strong></em></li>
|
||||
<li><del>刪除線</del></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="7" class="wiki-page"></a>內嵌圖像</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong></strong> 顯示一個位於 image_url 位址的圖像 (markdown 語法)</li>
|
||||
<li>若您附加了一個圖像到 Wiki 頁面中,可以使用他的檔案名稱來顯示成內嵌圖像: <strong></strong></li>
|
||||
<li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v (note that Internet Explorer is not supported).</li>
|
||||
<li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="8" class="wiki-page"></a>標題</h3>
|
||||
|
||||
<pre>
|
||||
# 標題
|
||||
## 次標題
|
||||
### 次次標題
|
||||
</pre>
|
||||
|
||||
<p>Redmine 為每一種標題指定一個 HTML 錨定 (anchor) ,因此您可使用 "#標題" 、 "#次標題" 等方式連結至這些標題。</p>
|
||||
|
||||
|
||||
<h3><a name="10" class="wiki-page"></a>區塊引述</h3>
|
||||
|
||||
<p>使用 <strong>></strong> 啟動一個區塊引述的段落。</p>
|
||||
|
||||
<pre>
|
||||
> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
|
||||
To go live, all you need to add is a database and a web server.
|
||||
</pre>
|
||||
|
||||
<p>Display:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3><a name="11" class="wiki-page"></a>目錄</h3>
|
||||
|
||||
<pre>
|
||||
{{toc}} => 靠左對齊目錄
|
||||
{{>toc}} => 靠右對齊目錄
|
||||
</pre>
|
||||
|
||||
<h3><a name="14" class="wiki-page"></a>水平線</h3>
|
||||
|
||||
<pre>
|
||||
---
|
||||
</pre>
|
||||
|
||||
<h2><a name="12" class="wiki-page"></a>巨集</h2>
|
||||
|
||||
<p>Redmine 內建下列巨集:</p>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt><code>hello_world</code></dt>
|
||||
<dd><p>範例巨集</p></dd>
|
||||
|
||||
<dt><code>macro_list</code></dt>
|
||||
<dd><p>顯示所有可用巨集的清單,若巨集有提供說明也會一併顯示。</p></dd>
|
||||
|
||||
<dt><code>child_pages</code></dt>
|
||||
<dd><p>顯示子頁面的清單。 若未指定參數,它將會顯示目前 Wiki 頁面的子頁面清單。 範例:</p>
|
||||
<pre><code>{{child_pages}} -- 僅可於某 Wiki 頁面中被使用
|
||||
{{child_pages(depth=2)}} -- 僅顯示兩層巢狀層次</code></pre></dd>
|
||||
|
||||
<dt><code>include</code></dt>
|
||||
<dd><p>引入一個 wiki 頁面。範例:</p>
|
||||
<pre><code>{{include(Foo)}}</code></pre>
|
||||
<p>或用以引入某特定專案的 Wiki 頁面:</p>
|
||||
<pre><code>{{include(projectname:Foo)}}</code></pre></dd>
|
||||
|
||||
<dt><code>collapse</code></dt>
|
||||
<dd><p>插入一個摺疊的文字區塊。範例:</p>
|
||||
<pre><code>{{collapse(View details...)
|
||||
This is a block of text that is collapsed by default.
|
||||
It can be expanded by clicking a link.
|
||||
}}</code></pre></dd>
|
||||
|
||||
<dt><code>thumbnail</code></dt>
|
||||
<dd><p>顯示可被點擊的附加圖像之縮圖。範例:</p>
|
||||
<pre>{{thumbnail(image.png)}}
|
||||
{{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
|
||||
|
||||
<dt><code>issue</code></dt>
|
||||
<dd><p>Inserts a link to an issue with flexible text. Examples:</p>
|
||||
<pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
|
||||
{{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
|
||||
{{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
|
||||
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
|
||||
</dl>
|
||||
</p>
|
||||
|
||||
<h2><a name="13" class="wiki-page"></a>程式碼醒目提示</h2>
|
||||
|
||||
<p>Default code highlighting relies on <a href="https://rouge.jneen.net/" class="external">Rouge</a>, a pure Ruby code highlighter. Rouge supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages - the names inside parentheses are aliases. Please refer to the <a href="<%= help_code_highlighting_path %>" target="_blank">list of languages supported by Redmine code highlighter</a>.</p>
|
||||
|
||||
<p>您可載任何支援 Wiki 格式設定的地方,使用這個語法來醒目提示程式碼 (注意語言與其別名的名稱不須區分大小寫):</p>
|
||||
|
||||
<pre>
|
||||
``` ruby
|
||||
將程式碼放在這裡。
|
||||
```
|
||||
</pre>
|
||||
|
||||
<p>範例:</p>
|
||||
|
||||
<pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
|
||||
<span class="k">class</span> <span class="nc">Greeter</span>
|
||||
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
|
||||
<span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">salute</span>
|
||||
<span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,78 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Wiki 格式設定</title>
|
||||
<%= stylesheet_link_tag "wiki_syntax.css" %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Wiki 語法快速對照表 (Markdown)</h1>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr><th colspan="3">字型樣式 <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "5") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/bold.svg", { alt: "強調粗體" }) %></th><td style="width:50%;">**強調粗體**</td><td style="width:50%;"><strong>強調粗體</strong></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/italic.svg", { alt: "斜體" }) %></th><td>*斜體*</td><td><em>斜體</em></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/strikethrough.svg", { alt: "刪除線" }) %></th><td>~~刪除線~~</td><td><del>刪除線</del></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/letter-c.svg", { alt: "內嵌程式碼" }) %></th><td>`內嵌程式碼`</td><td><code>內嵌程式碼</code></td></tr>
|
||||
<tr><th><span class="syntax-pre"/></th><td>```<br /> 格式化<br /> 的段落文字<br />```</td><td>
|
||||
<pre>
|
||||
格式化
|
||||
的段落文字
|
||||
</pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">反白程式碼 <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "13") %>" target="_blank">more</a> | <a href="<%= help_code_highlighting_path %>" target="_blank">supported languages</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/code.svg", { alt: "反白程式碼" }) %></th><td>``` ruby<br />3.times do<br /> puts 'Hello'<br />end<br />```</td><td>
|
||||
<pre><code class="ruby syntaxhl"><span class="mi">3</span><span class="p">.</span><span class="nf">times</span> <span class="k">do</span>
|
||||
<span class="nb">puts</span> <span class="s1">'Hello'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
</td></tr>
|
||||
|
||||
<tr><th colspan="3">清單</th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list.svg", { alt: "不排序清單" }) %></th><td>* 清單項目 1<br /> * 子清單項目<br />* 清單項目 2</td><td><ul><li>清單項目 1<ul><li>子清單項目</li></ul></li><li>清單項目 2</li></ul></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/list-numbers.svg", { alt: "排序清單" }) %></th><td>1. 清單項目 1<br /> 1. 子清單項目<br />2. 清單項目 2</td><td><ol><li>清單項目 1<ol><li>子清單項目</li></ol></li><li>清單項目 2</li></ol></td></tr>
|
||||
|
||||
<tr><th colspan="3">標題 <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "8") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h1.svg", { alt: "標題 1" }) %></th><td># 標題 1</td><td><h1>標題 1</h1></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h2.svg", { alt: "標題 2" }) %></th><td>## 標題 2</td><td><h2>標題 2</h2></td></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/h3.svg", { alt: "標題 3" }) %></th><td>### 標題 3</td><td><h3>標題 3</h3></td></tr>
|
||||
|
||||
<tr><th colspan="3">連結 <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "4") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
|
||||
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">Redmine 連結 <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "3") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/wiki_link.svg", { alt: "連結至一個 Wiki 頁面" }) %></th><td>[[Wiki 頁面]]</td><td><a href="#">Wiki 頁面</a></td></tr>
|
||||
<tr><th></th><td>議題 #12</td><td>議題 <a href="#">#12</a></td></tr>
|
||||
<tr><th></th><td>##12</td><td><a href="#">Bug #12</a>: The issue subject</td></tr>
|
||||
<tr><th></th><td>版次 r43</td><td>版次 <a href="#">r43</a></td></tr>
|
||||
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
|
||||
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
|
||||
|
||||
<tr><th colspan="3">內嵌圖像 <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "7") %>" target="_blank">more</a>)</span></th></tr>
|
||||
<tr><th><%= image_tag("jstoolbar/image.svg", { alt: "圖像" }) %></th><td></td><td></td></tr>
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
|
||||
<tr><th colspan="3">表格</th></tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
|
||||
<td>
|
||||
<table class="sample">
|
||||
<tbody>
|
||||
<th>A</th><th>B</th><th>C</th>
|
||||
<tr><td>A</td><td>B</td><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">更多資訊</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -13,7 +13,7 @@
|
||||
<% elsif Redmine::MimeType.of(@path) == 'text/x-textile' %>
|
||||
<%= render :partial => 'common/markup', :locals => {:markup_text_formatting => 'textile', :markup_text => @content} %>
|
||||
<% elsif Redmine::MimeType.of(@path) == 'text/markdown' %>
|
||||
<%= render :partial => 'common/markup', :locals => {:markup_text_formatting => markdown_formatter, :markup_text => @content} %>
|
||||
<%= render :partial => 'common/markup', :locals => {:markup_text_formatting => 'common_mark', :markup_text => @content} %>
|
||||
<% elsif @content %>
|
||||
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
||||
<% else %>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
class ChangeTextFormattingFromMarkdownToCommonMark < ActiveRecord::Migration[7.2]
|
||||
def up
|
||||
Setting.find_by(name: 'text_formatting', value: 'markdown')&.update(value: 'common_mark')
|
||||
end
|
||||
|
||||
def down
|
||||
# no-op
|
||||
end
|
||||
end
|
||||
@@ -24,11 +24,6 @@ begin
|
||||
rescue LoadError
|
||||
# MiniMagick is not available
|
||||
end
|
||||
begin
|
||||
require 'redcarpet' unless Object.const_defined?(:Redcarpet)
|
||||
rescue LoadError
|
||||
# Redcarpet is not available
|
||||
end
|
||||
begin
|
||||
require 'commonmarker' unless Object.const_defined?(:CommonMarker)
|
||||
rescue LoadError
|
||||
|
||||
@@ -86,7 +86,7 @@ module Redmine
|
||||
case text_formatting
|
||||
when 'textile'
|
||||
content = content.gsub(%r{<pre>(.*?)</pre>}m, '')
|
||||
when 'markdown', 'common_mark'
|
||||
when 'common_mark'
|
||||
content = content.gsub(%r{(~~~|```)(.*?)(~~~|```)}m, '')
|
||||
end
|
||||
|
||||
|
||||
@@ -408,7 +408,6 @@ module Redmine
|
||||
|
||||
WikiFormatting.map do |format|
|
||||
format.register :textile
|
||||
format.register :markdown, label: 'Markdown (deprecated)' if Object.const_defined?(:Redcarpet)
|
||||
if Object.const_defined?(:CommonMarker)
|
||||
format.register :common_mark, label: 'CommonMark Markdown (GitHub Flavored)'
|
||||
end
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006- Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require 'cgi'
|
||||
|
||||
module Redmine
|
||||
module WikiFormatting
|
||||
module Markdown
|
||||
class HTML < Redcarpet::Render::HTML
|
||||
include ActionView::Helpers::TagHelper
|
||||
include Redmine::Helpers::URL
|
||||
|
||||
def autolink(link, link_type)
|
||||
if link_type == :email
|
||||
link("mailto:#{link}", nil, link) || CGI.escapeHTML(link)
|
||||
else
|
||||
content = link
|
||||
# Pretty printing: if we get an email address as an actual URI, e.g.
|
||||
# `mailto:foo@bar.com`, we don't want to print the `mailto:` prefix
|
||||
content = link[7..-1] if link.start_with?('mailto:')
|
||||
|
||||
link(link, nil, content) || CGI.escapeHTML(link)
|
||||
end
|
||||
end
|
||||
|
||||
def link(link, title, content)
|
||||
return nil unless uri_with_link_safe_scheme?(link)
|
||||
|
||||
css = nil
|
||||
unless link&.starts_with?('/') || link&.starts_with?('mailto:')
|
||||
css = 'external'
|
||||
end
|
||||
content_tag('a', content.to_s.html_safe, :href => link, :title => title, :class => css)
|
||||
end
|
||||
|
||||
def block_code(code, language)
|
||||
if language.present? && Redmine::SyntaxHighlighting.language_supported?(language)
|
||||
html = Redmine::SyntaxHighlighting.highlight_by_language(code, language)
|
||||
classattr = " class=\"#{CGI.escapeHTML language} syntaxhl\""
|
||||
else
|
||||
html = CGI.escapeHTML(code)
|
||||
end
|
||||
# original language for extension development
|
||||
langattr = " data-language=\"#{CGI.escapeHTML language}\"" if language.present?
|
||||
"<pre><code#{classattr}#{langattr}>#{html}</code></pre>"
|
||||
end
|
||||
|
||||
def image(link, title, alt_text)
|
||||
return unless uri_with_safe_scheme?(link)
|
||||
|
||||
tag('img', :src => link, :alt => alt_text || "", :title => title)
|
||||
end
|
||||
end
|
||||
|
||||
class Formatter
|
||||
include Redmine::WikiFormatting::LinksHelper
|
||||
include Redmine::WikiFormatting::SectionHelper
|
||||
alias :inline_restore_redmine_links :restore_redmine_links
|
||||
|
||||
def initialize(text)
|
||||
@text = text
|
||||
end
|
||||
|
||||
def to_html(*args)
|
||||
html = formatter.render(@text)
|
||||
html = inline_restore_redmine_links(html)
|
||||
html
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def formatter
|
||||
@@formatter ||= Redcarpet::Markdown.new(
|
||||
Redmine::WikiFormatting::Markdown::HTML.new(
|
||||
:filter_html => true,
|
||||
:hard_wrap => true
|
||||
),
|
||||
:autolink => true,
|
||||
:fenced_code_blocks => true,
|
||||
:space_after_headers => true,
|
||||
:tables => true,
|
||||
:strikethrough => true,
|
||||
:superscript => true,
|
||||
:no_intra_emphasis => true,
|
||||
:footnotes => true,
|
||||
:lax_spacing => true,
|
||||
:underline => true
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,64 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006- Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
module Redmine
|
||||
module WikiFormatting
|
||||
module Markdown
|
||||
module Helper
|
||||
def wikitoolbar_for(field_id, preview_url = preview_text_path)
|
||||
heads_for_wiki_formatter
|
||||
|
||||
javascript_tag(
|
||||
"var wikiToolbar = new jsToolBar(document.getElementById('#{field_id}')); " \
|
||||
"wikiToolbar.setHelpLink('#{escape_javascript help_wiki_syntax_path}'); " \
|
||||
"wikiToolbar.setPreviewUrl('#{escape_javascript preview_url}'); " \
|
||||
"wikiToolbar.draw();"
|
||||
)
|
||||
end
|
||||
|
||||
def initial_page_content(page)
|
||||
"# #{page.pretty_title}"
|
||||
end
|
||||
|
||||
def heads_for_wiki_formatter
|
||||
unless @heads_for_wiki_formatter_included
|
||||
toolbar_language_options = User.current && User.current.pref.toolbar_language_options
|
||||
lang =
|
||||
if toolbar_language_options.nil?
|
||||
UserPreference::DEFAULT_TOOLBAR_LANGUAGE_OPTIONS
|
||||
else
|
||||
toolbar_language_options.split(',')
|
||||
end
|
||||
content_for :header_tags do
|
||||
javascript_include_tag('jstoolbar/jstoolbar') +
|
||||
javascript_include_tag('jstoolbar/markdown') +
|
||||
javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") +
|
||||
javascript_tag(
|
||||
"var wikiImageMimeTypes = #{Redmine::MimeType.by_type('image').to_json};" \
|
||||
"var userHlLanguages = #{lang.to_json};"
|
||||
) +
|
||||
stylesheet_link_tag('jstoolbar')
|
||||
end
|
||||
@heads_for_wiki_formatter_included = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,52 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006- Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
module Redmine
|
||||
module WikiFormatting
|
||||
module Markdown
|
||||
class HtmlParser < Redmine::WikiFormatting::HtmlParser
|
||||
self.tags = tags.merge(
|
||||
'b' => {:pre => '**', :post => '**'},
|
||||
'strong' => {:pre => '**', :post => '**'},
|
||||
'i' => {:pre => '*', :post => '*'},
|
||||
'em' => {:pre => '*', :post => '*'},
|
||||
'u' => {:pre => '_', :post => '_'},
|
||||
'strike' => {:pre => '~~', :post => '~~'},
|
||||
'h1' => {:pre => "\n\n# ", :post => "\n\n"},
|
||||
'h2' => {:pre => "\n\n## ", :post => "\n\n"},
|
||||
'h3' => {:pre => "\n\n### ", :post => "\n\n"},
|
||||
'h4' => {:pre => "\n\n#### ", :post => "\n\n"},
|
||||
'h5' => {:pre => "\n\n##### ", :post => "\n\n"},
|
||||
'h6' => {:pre => "\n\n###### ", :post => "\n\n"},
|
||||
'th' => {:pre => '*', :post => "*\n"},
|
||||
'td' => {:pre => '', :post => "\n"},
|
||||
'a' => lambda do |node|
|
||||
if node.content.present? && node.attributes.key?('href')
|
||||
%| [#{node.content}](#{node.attributes['href'].value}) |
|
||||
elsif node.attributes.key?('href')
|
||||
%| #{node.attributes['href'].value} |
|
||||
else
|
||||
node.content
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -25,7 +25,6 @@ class HelpControllerTest < Redmine::ControllerTest
|
||||
def test_get_help_wiki_syntax
|
||||
formatters = {
|
||||
:textile => "Wiki Syntax Quick Reference",
|
||||
:markdown => "Wiki Syntax Quick Reference (Markdown)",
|
||||
:common_mark => "Wiki Syntax Quick Reference (CommonMark Markdown (GitHub Flavored))"
|
||||
}
|
||||
|
||||
@@ -42,7 +41,6 @@ class HelpControllerTest < Redmine::ControllerTest
|
||||
def test_get_help_wiki_syntax_detailed
|
||||
formatters = {
|
||||
:textile => "Wiki formatting",
|
||||
:markdown => "Wiki formatting (Markdown)",
|
||||
:common_mark => "Wiki formatting (CommonMark Markdown (GitHub Flavored))"
|
||||
}
|
||||
|
||||
|
||||
@@ -263,16 +263,16 @@ class ApplicationHelperTest < Redmine::HelperTest
|
||||
end
|
||||
|
||||
def test_attached_images_with_markdown_and_non_ascii_filename
|
||||
skip unless Object.const_defined?(:Redcarpet)
|
||||
skip unless Object.const_defined?(:CommonMarker)
|
||||
|
||||
to_test = {
|
||||
'CAFÉ.JPG' => 'CAF%C3%89.JPG',
|
||||
'crème.jpg' => 'cr%C3%A8me.jpg',
|
||||
}
|
||||
with_settings :text_formatting => 'markdown' do
|
||||
with_settings :text_formatting => 'common_mark' do
|
||||
to_test.each do |filename, result|
|
||||
attachment = Attachment.generate!(:filename => filename)
|
||||
assert_include %(<img src="/attachments/download/#{attachment.id}/#{result}" alt="" loading="lazy" />),
|
||||
assert_include %(<img src="/attachments/download/#{attachment.id}/#{result}" alt="" loading="lazy">),
|
||||
textilizable("", :attachments => [attachment])
|
||||
end
|
||||
end
|
||||
@@ -643,9 +643,9 @@ class ApplicationHelperTest < Redmine::HelperTest
|
||||
end
|
||||
|
||||
def test_user_links_with_email_as_login_name_should_not_be_parsed_markdown
|
||||
with_settings :text_formatting => 'markdown' do
|
||||
with_settings :text_formatting => 'common_mark' do
|
||||
u = User.generate!(:login => 'jsmith@somenet.foo')
|
||||
html = '<a href=\"mailto:jsmith@somenet.foo\">jsmith@somenet.foo</a>'
|
||||
html = '<a href=\"mailto:jsmith@somenet.foo\" class=\"email\">jsmith@somenet.foo</a>'
|
||||
|
||||
# user link format: @jsmith@somenet.foo
|
||||
raw = "@jsmith@somenet.foo should not be parsed in jsmith@somenet.foo"
|
||||
@@ -1010,7 +1010,7 @@ class ApplicationHelperTest < Redmine::HelperTest
|
||||
%r{<p><a class="attachment" href="/attachments/#{attachment.id}">image@2x.png</a> should not be parsed in image@2x.png</p>},
|
||||
textilizable(raw, :attachments => [attachment]))
|
||||
end
|
||||
with_settings :text_formatting => 'markdown' do
|
||||
with_settings :text_formatting => 'common_mark' do
|
||||
raw = "attachment:image@2x.png should not be parsed in image@2x.png"
|
||||
assert_match(
|
||||
%r{<p><a class="attachment" href="/attachments/#{attachment.id}">image@2x.png</a> should not be parsed in image@2x.png</p>},
|
||||
@@ -1133,7 +1133,7 @@ class ApplicationHelperTest < Redmine::HelperTest
|
||||
to_test = wiki_links_with_special_characters
|
||||
|
||||
@project = Project.find(1)
|
||||
with_settings :text_formatting => 'markdown' do
|
||||
with_settings :text_formatting => 'common_mark' do
|
||||
to_test.each {|text, result| assert_equal "<p>#{result}</p>", textilizable(text).strip}
|
||||
end
|
||||
end
|
||||
@@ -1175,7 +1175,7 @@ class ApplicationHelperTest < Redmine::HelperTest
|
||||
with_settings :text_formatting => 'textile' do
|
||||
to_test.each {|text, result| assert_equal "<p>#{result}</p>", textilizable(text)}
|
||||
end
|
||||
with_settings :text_formatting => 'markdown' do
|
||||
with_settings :text_formatting => 'common_mark' do
|
||||
to_test.each {|text, result| assert_equal "<p>#{result}</p>", textilizable(text).strip}
|
||||
end
|
||||
end
|
||||
@@ -1669,9 +1669,9 @@ class ApplicationHelperTest < Redmine::HelperTest
|
||||
end
|
||||
end
|
||||
|
||||
if Object.const_defined?(:Redcarpet)
|
||||
if Object.const_defined?(:CommonMarker)
|
||||
def test_toc_with_markdown_formatting_should_be_parsed
|
||||
with_settings :text_formatting => 'markdown' do
|
||||
with_settings :text_formatting => 'common_mark' do
|
||||
assert_select_in textilizable("{{toc}}\n\n# Heading"), 'ul.toc li', :text => 'Heading'
|
||||
assert_select_in textilizable("{{<toc}}\n\n# Heading"), 'ul.toc.left li', :text => 'Heading'
|
||||
assert_select_in textilizable("{{>toc}}\n\n# Heading"), 'ul.toc.right li', :text => 'Heading'
|
||||
@@ -2321,20 +2321,6 @@ class ApplicationHelperTest < Redmine::HelperTest
|
||||
end
|
||||
end
|
||||
|
||||
# TODO: Remove this test when Redcarpet-based Markdown formatter is removed
|
||||
def test_markdown_formatter
|
||||
[
|
||||
['markdown', 'markdown'],
|
||||
['common_mark', 'common_mark'],
|
||||
['textile', 'common_mark'],
|
||||
['', 'common_mark']
|
||||
].each do |text_formatting, expected|
|
||||
with_settings text_formatting: text_formatting do
|
||||
assert_equal expected, markdown_formatter
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_export_csv_separator_select_tag
|
||||
with_locale 'en' do
|
||||
result = export_csv_separator_select_tag
|
||||
|
||||
@@ -90,7 +90,7 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
|
||||
end
|
||||
|
||||
def test_keyboard_shortcuts_for_wiki_toolbar_buttons_using_markdown
|
||||
with_settings :text_formatting => 'markdown' do
|
||||
with_settings :text_formatting => 'common_mark' do
|
||||
log_user('jsmith', 'jsmith')
|
||||
visit 'issues/new'
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ class Redmine::Acts::MentionableTest < ActiveSupport::TestCase
|
||||
```
|
||||
STR
|
||||
|
||||
with_settings text_formatting: 'markdown' do
|
||||
with_settings text_formatting: 'common_mark' do
|
||||
issue = Issue.generate!(project_id: 1, description: description)
|
||||
|
||||
assert_equal [], issue.mentioned_users
|
||||
|
||||
@@ -1,354 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006- Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require_relative '../../../../test_helper'
|
||||
|
||||
class Redmine::WikiFormatting::MarkdownFormatterTest < ActionView::TestCase
|
||||
def setup
|
||||
unless Object.const_defined?(:Redcarpet)
|
||||
skip "Redcarpet is not installed"
|
||||
end
|
||||
@formatter = Redmine::WikiFormatting::Markdown::Formatter
|
||||
end
|
||||
|
||||
def test_syntax_error_in_image_reference_should_not_raise_exception
|
||||
assert @formatter.new("!>[](foo.png)").to_html
|
||||
end
|
||||
|
||||
def test_empty_image_should_not_raise_exception
|
||||
assert @formatter.new("![]()").to_html
|
||||
end
|
||||
|
||||
# re-using the formatter after getting above error crashes the
|
||||
# ruby interpreter. This seems to be related to
|
||||
# https://github.com/vmg/redcarpet/issues/318
|
||||
def test_should_not_crash_redcarpet_after_syntax_error
|
||||
@formatter.new("!>[](foo.png)").to_html rescue nil
|
||||
assert @formatter.new("").to_html.present?
|
||||
end
|
||||
|
||||
def test_inline_style
|
||||
assert_equal "<p><strong>foo</strong></p>", @formatter.new("**foo**").to_html.strip
|
||||
end
|
||||
|
||||
def test_not_set_intra_emphasis
|
||||
assert_equal "<p>foo_bar_baz</p>", @formatter.new("foo_bar_baz").to_html.strip
|
||||
end
|
||||
|
||||
def test_wiki_links_should_be_preserved
|
||||
text = 'This is a wiki link: [[Foo]]'
|
||||
assert_include '[[Foo]]', @formatter.new(text).to_html
|
||||
end
|
||||
|
||||
def test_redmine_links_with_double_quotes_should_be_preserved
|
||||
text = 'This is a redmine link: version:"1.0"'
|
||||
assert_include 'version:"1.0"', @formatter.new(text).to_html
|
||||
end
|
||||
|
||||
def test_should_support_syntax_highlight
|
||||
text = <<~STR
|
||||
~~~ruby
|
||||
def foo
|
||||
end
|
||||
~~~
|
||||
STR
|
||||
assert_select_in @formatter.new(text).to_html, 'pre code.ruby.syntaxhl' do
|
||||
assert_select 'span.k', :text => 'def'
|
||||
assert_select "[data-language='ruby']"
|
||||
end
|
||||
end
|
||||
|
||||
def test_should_not_allow_invalid_language_for_code_blocks
|
||||
text = <<~STR
|
||||
~~~foo
|
||||
test
|
||||
~~~
|
||||
STR
|
||||
assert_equal "<pre><code data-language=\"foo\">test\n</code></pre>", @formatter.new(text).to_html
|
||||
end
|
||||
|
||||
def test_should_preserve_code_block_language_in_data_language
|
||||
text = <<~STR
|
||||
~~~c-k&r
|
||||
test
|
||||
~~~
|
||||
STR
|
||||
assert_equal "<pre><code data-language=\"c-k&r\">test\n</code></pre>", @formatter.new(text).to_html
|
||||
end
|
||||
|
||||
def test_external_links_should_have_external_css_class
|
||||
text = 'This is a [link](http://example.net/)'
|
||||
assert_equal '<p>This is a <a href="http://example.net/" class="external">link</a></p>', @formatter.new(text).to_html.strip
|
||||
end
|
||||
|
||||
def test_locals_links_should_not_have_external_css_class
|
||||
text = 'This is a [link](/issues)'
|
||||
assert_equal '<p>This is a <a href="/issues">link</a></p>', @formatter.new(text).to_html.strip
|
||||
end
|
||||
|
||||
def test_markdown_should_not_require_surrounded_empty_line
|
||||
text = <<~STR
|
||||
This is a list:
|
||||
* One
|
||||
* Two
|
||||
STR
|
||||
assert_equal "<p>This is a list:</p>\n\n<ul>\n<li>One</li>\n<li>Two</li>\n</ul>", @formatter.new(text).to_html.strip
|
||||
end
|
||||
|
||||
def test_footnotes
|
||||
text = <<~STR
|
||||
This is some text[^1].
|
||||
|
||||
[^1]: This is the foot note
|
||||
STR
|
||||
expected = <<~EXPECTED
|
||||
<p>This is some text<sup id="fnref1"><a href="#fn1">1</a></sup>.</p>
|
||||
<div class="footnotes">
|
||||
<hr>
|
||||
<ol>
|
||||
|
||||
<li id="fn1">
|
||||
<p>This is the foot note <a href="#fnref1">↩</a></p>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</div>
|
||||
EXPECTED
|
||||
assert_equal expected.gsub(%r{[\r\n\t]}, ''), @formatter.new(text).to_html.gsub(%r{[\r\n\t]}, '')
|
||||
end
|
||||
|
||||
STR_WITH_PRE = [
|
||||
# 0
|
||||
<<~STR.chomp,
|
||||
# Title
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.
|
||||
STR
|
||||
# 1
|
||||
<<~STR.chomp,
|
||||
## Heading 2
|
||||
|
||||
~~~ruby
|
||||
def foo
|
||||
end
|
||||
~~~
|
||||
|
||||
Morbi facilisis accumsan orci non pharetra.
|
||||
|
||||
~~~ ruby
|
||||
def foo
|
||||
end
|
||||
~~~
|
||||
|
||||
```
|
||||
Pre Content:
|
||||
|
||||
## Inside pre
|
||||
|
||||
<tag> inside pre block
|
||||
|
||||
Morbi facilisis accumsan orci non pharetra.
|
||||
```
|
||||
STR
|
||||
# 2
|
||||
<<~STR.chomp,
|
||||
### Heading 3
|
||||
|
||||
Nulla nunc nisi, egestas in ornare vel, posuere ac libero.
|
||||
STR
|
||||
]
|
||||
|
||||
def test_get_section_should_ignore_pre_content
|
||||
text = STR_WITH_PRE.join("\n\n")
|
||||
|
||||
assert_section_with_hash STR_WITH_PRE[1..2].join("\n\n"), text, 2
|
||||
assert_section_with_hash STR_WITH_PRE[2], text, 3
|
||||
end
|
||||
|
||||
def test_update_section_should_not_escape_pre_content_outside_section
|
||||
text = STR_WITH_PRE.join("\n\n")
|
||||
replacement = "New text"
|
||||
assert_equal(
|
||||
[STR_WITH_PRE[0..1], "New text"].flatten.join("\n\n"),
|
||||
@formatter.new(text).update_section(3, replacement)
|
||||
)
|
||||
end
|
||||
|
||||
STR_SETEXT_LIKE = [
|
||||
# 0
|
||||
<<~STR.chomp,
|
||||
# Title
|
||||
STR
|
||||
# 1
|
||||
<<~STR.chomp,
|
||||
## Heading 2
|
||||
|
||||
Thematic breaks - not be confused with setext headings.
|
||||
|
||||
---
|
||||
|
||||
Preceding CRLF is the default for web-submitted data.
|
||||
\r
|
||||
---\r
|
||||
\r
|
||||
|
||||
A space-only line does not mean much.
|
||||
\s
|
||||
---
|
||||
|
||||
End of thematic breaks.
|
||||
STR
|
||||
# 2
|
||||
<<~STR.chomp,
|
||||
## Heading 2
|
||||
Nulla nunc nisi, egestas in ornare vel, posuere ac libero.
|
||||
STR
|
||||
]
|
||||
|
||||
STR_RARE_SETEXT_LIKE = [
|
||||
# 0
|
||||
<<~STR.chomp,
|
||||
# Title
|
||||
STR
|
||||
# 1
|
||||
<<~STR.chomp,
|
||||
## Heading 2
|
||||
|
||||
- item
|
||||
one
|
||||
-
|
||||
not a heading
|
||||
STR
|
||||
# 2
|
||||
<<~STR.chomp,
|
||||
## Heading 2
|
||||
Nulla nunc nisi, egestas in ornare vel, posuere ac libero.
|
||||
STR
|
||||
]
|
||||
|
||||
def test_get_section_should_ignore_setext_like_text
|
||||
text = STR_SETEXT_LIKE.join("\n\n")
|
||||
assert_section_with_hash STR_SETEXT_LIKE[1], text, 2
|
||||
assert_section_with_hash STR_SETEXT_LIKE[2], text, 3
|
||||
end
|
||||
|
||||
def test_get_section_should_ignore_rare_setext_like_text
|
||||
begin
|
||||
text = STR_RARE_SETEXT_LIKE.join("\n\n")
|
||||
assert_section_with_hash STR_RARE_SETEXT_LIKE[1], text, 2
|
||||
assert_section_with_hash STR_RARE_SETEXT_LIKE[2], text, 3
|
||||
rescue Minitest::Assertion => e
|
||||
skip "Section extraction is currently limited, see #35037. Known error: #{e.message}"
|
||||
end
|
||||
assert_not "This test should be adjusted when fixing the known error."
|
||||
end
|
||||
|
||||
def test_should_support_underlined_text
|
||||
text = 'This _text_ should be underlined'
|
||||
assert_equal '<p>This <u>text</u> should be underlined</p>', format(text)
|
||||
end
|
||||
|
||||
def test_should_autolink_mails
|
||||
input = "foo@example.org"
|
||||
assert_equal %(<p><a href="mailto:foo@example.org">foo@example.org</a></p>), format(input)
|
||||
|
||||
# The redcloth autolinker parses "plain" mailto links a bit unfortunately.
|
||||
# We do the best we can here...
|
||||
input = "mailto:foo@example.org"
|
||||
assert_equal %(<p>mailto:<a href="mailto:foo@example.org">foo@example.org</a></p>), format(input)
|
||||
end
|
||||
|
||||
def test_should_fixup_mailto_links
|
||||
input = "<mailto:foo@example.org>"
|
||||
assert_equal %(<p><a href="mailto:foo@example.org">foo@example.org</a></p>), format(input)
|
||||
end
|
||||
|
||||
def test_should_fixup_autolinked_user_references
|
||||
text = "user:user@example.org"
|
||||
assert_equal "<p>#{text}</p>", format(text)
|
||||
|
||||
text = "@user@example.org"
|
||||
assert_equal "<p>#{text}</p>", format(text)
|
||||
end
|
||||
|
||||
def test_should_fixup_autolinked_hires_files
|
||||
text = "printscreen@2x.png"
|
||||
assert_equal "<p>#{text}</p>", format(text).strip
|
||||
end
|
||||
|
||||
def test_should_allow_links_with_safe_url_schemes
|
||||
safe_schemes = %w(http https ftp)
|
||||
link_safe_schemes = %w(ssh foo)
|
||||
|
||||
(safe_schemes + link_safe_schemes).each do |scheme|
|
||||
input = "[#{scheme}](#{scheme}://example.com)"
|
||||
expected = %(<p><a href="#{scheme}://example.com" class="external">#{scheme}</a></p>)
|
||||
|
||||
assert_equal expected, format(input)
|
||||
end
|
||||
end
|
||||
|
||||
def test_should_not_allow_links_with_unsafe_url_schemes
|
||||
unsafe_schemes = %w(data javascript vbscript)
|
||||
|
||||
unsafe_schemes.each do |scheme|
|
||||
input = "[#{scheme}](#{scheme}:something)"
|
||||
assert_equal "<p>#{input}</p>", format(input)
|
||||
end
|
||||
end
|
||||
|
||||
def test_should_allow_autolinks_with_safe_url_schemes
|
||||
safe_schemes = %w(http https ftp)
|
||||
link_safe_schemes = %w(ssh foo)
|
||||
|
||||
(safe_schemes + link_safe_schemes).each do |scheme|
|
||||
input = "#{scheme}://example.org"
|
||||
expected = %(<p><a href="#{input}" class="external">#{input}</a></p>)
|
||||
|
||||
assert_equal expected, format(input) if safe_schemes.include?(scheme)
|
||||
assert_equal expected, format("<#{input}>")
|
||||
end
|
||||
end
|
||||
|
||||
def test_should_not_autolink_unsafe_schemes
|
||||
unsafe_schemes = %w(data javascript vbscript)
|
||||
|
||||
unsafe_schemes.each do |scheme|
|
||||
link = "#{scheme}:something"
|
||||
|
||||
assert_equal "<p>#{link}</p>", format(link)
|
||||
assert_equal "<p>#{link}</p>", format("<#{link}>")
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def format(text)
|
||||
@formatter.new(text).to_html.strip
|
||||
end
|
||||
|
||||
def assert_section_with_hash(expected, text, index)
|
||||
result = @formatter.new(text).get_section(index)
|
||||
|
||||
assert_kind_of Array, result
|
||||
assert_equal 2, result.size
|
||||
assert_equal expected, result.first, "section content did not match"
|
||||
assert_equal ActiveSupport::Digest.hexdigest(expected), result.last, "section hash did not match"
|
||||
end
|
||||
end
|
||||
@@ -1,56 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006- Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require_relative '../../../../test_helper'
|
||||
|
||||
class Redmine::WikiFormatting::MarkdownHtmlParserTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
@parser = Redmine::WikiFormatting::Markdown::HtmlParser
|
||||
end
|
||||
|
||||
def test_should_convert_tags
|
||||
assert_equal(
|
||||
'A **simple** html snippet.',
|
||||
@parser.to_text('<p>A <b>simple</b> html snippet.</p>')
|
||||
)
|
||||
assert_equal(
|
||||
'foo [bar](http://example.com/) baz',
|
||||
@parser.to_text('foo<a href="http://example.com/">bar</a>baz')
|
||||
)
|
||||
assert_equal(
|
||||
'foo http://example.com/ baz',
|
||||
@parser.to_text('foo<a href="http://example.com/"></a>baz')
|
||||
)
|
||||
assert_equal(
|
||||
'foobarbaz',
|
||||
@parser.to_text('foo<a name="Header-one">bar</a>baz')
|
||||
)
|
||||
assert_equal(
|
||||
'foobaz',
|
||||
@parser.to_text('foo<a name="Header-one"/>baz')
|
||||
)
|
||||
end
|
||||
|
||||
def test_html_tables_conversion
|
||||
assert_equal(
|
||||
"*th1*\n*th2*\n\ntd1\ntd2",
|
||||
@parser.to_text('<table><tr><th>th1</th><th>th2</th></tr><tr><td>td1</td><td>td2</td></tr></table>')
|
||||
)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user