From 7e0ae7ae520727414f7275ac525b0272407ef155 Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Sun, 25 Jul 2021 18:57:43 +0500 Subject: [PATCH] Start writing the Mycomarkup article I got a little tired, will finish later Also, there seems to be a bug with anchor links //again//. Or maybe not --- help/en/mycomarkup.myco | 101 +++++++++++++ views/stuff.qtpl | 1 + views/stuff.qtpl.go | 305 ++++++++++++++++++++-------------------- 3 files changed, 255 insertions(+), 152 deletions(-) create mode 100644 help/en/mycomarkup.myco diff --git a/help/en/mycomarkup.myco b/help/en/mycomarkup.myco new file mode 100644 index 0000000..5dab079 --- /dev/null +++ b/help/en/mycomarkup.myco @@ -0,0 +1,101 @@ +# Mycomarkup +**Mycomarkup** is Mycorrhiza Wiki's own markup language. + +It is the only supported markup, there is no support for Markdown, Creole, etc. + +A Mycomarkup document (which is most often a hypha's text part) consists of //blocks//. There are different blocks for different purposes. + +## Table of contents +=> /help/en/mycomarkup#Paragraph Paragraph +=> /help/en/mycomarkup#Heading Heading +=> /help/en/mycomarkup#Codeblock Codeblock +=> /help/en/mycomarkup#Horizontal_line Horizontal line + +## Paragraph +**Paragraphs** are the most ubiquitous blocks. You will use them a lot. + +To create a paragraph, just write text. Paragraphs are separated by empty lines. + +* {``` +Paragraph 1 + +Paragraph 2 +Second line of paragraph 2 +```} +* { +Paragraph 1 + +Paragraph 2 +Second line of paragraph 2 +} + +You can apply styling to paragraph content. +* {``` +You can use //italic//, **bold**, `monospace`, ++highlighted++, ^^lifted&^, __underscored__, ,,lowered,, or ~~striked-through~~ text. You can also ++//combine//++ them! +```} +* You can use //italic//, **bold**, `monospace`, ++highlighted++, ^^lifted^^, __underscored__, ,,lowered,, or ~~striked-through~~ text. You can also ++//combine//++ them! + +Use the backslash to prevent the styling. +* {``` +This is not \//italic\// +```} +* This is not \//italic\// + +You do not have to close the stylings, they will span until the end of line. +* {``` +This is //italic +This is not +```} +* { +This is //italic +This is not +} + +You can include inline links. +* {``` +Just a paragraph with a couple of [[https://example.org | links]] leading [[nowhere]]. +```} +* Just a paragraph with a couple of [[https://example.org | links]] leading [[nowhere]]. + +=> /help/en/link Read more about links + +## Heading +There are six levels of **headings**. They consist of some hash signs followed by a space and the heading itself. You can format the heading like a paragraph. You should probably not use level 1 because the hypha name title is already level 1. + +``` +# level 1 +## level 2 +### level 3 +#### level 4 +##### level 5 +###### level 6 +``` + +There is an invisible link denoted by the ยง sign near every heading. You can reveal it with a mouse. If you click it, the URL in the browser will change to the URL leading to that very heading. Try that on headings in this article. + +## Codeblock +Use **codeblocks** to show code or any other preformatted text. Codeblocks start with triple backticks on column 1 and end similarly. You can write any text after the backticks, it is ignored. Put the preformatted text between them. + +Like that, but without leading spaces: +``` + ``` + this is preformatted + see + ``` +``` + +``` +this is preformatted + see +``` + +## Horizontal line +Write four hyphens to insert a **horizontal line**. + +* {``` +---- +```} +* ---- + +## See also +=> https://mycorrhiza.wiki/hypha/essay/why_mycomarkup Why it was created \ No newline at end of file diff --git a/views/stuff.qtpl b/views/stuff.qtpl index 4c8ac5d..2d12609 100644 --- a/views/stuff.qtpl +++ b/views/stuff.qtpl @@ -147,6 +147,7 @@ It outputs a poorly formatted JSON, but it works and is valid.
  • Attachment
  • +
  • Mycomarkup
  • Interface
  • +
  • Mycomarkup
  • Interface `) -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 } -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 func writehelpTopicsHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 streamhelpTopicsHTML(qw422016) -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 } -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 func helpTopicsHTML() string { -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 writehelpTopicsHTML(qb422016) -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 return qs422016 -//line views/stuff.qtpl:166 +//line views/stuff.qtpl:167 } -//line views/stuff.qtpl:168 +//line views/stuff.qtpl:169 func StreamUserListHTML(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:168 +//line views/stuff.qtpl:169 qw422016.N().S(`

    List of users

    `) -//line views/stuff.qtpl:173 +//line views/stuff.qtpl:174 var ( admins = make([]string, 0) moderators = make([]string, 0) @@ -567,345 +568,345 @@ func StreamUserListHTML(qw422016 *qt422016.Writer) { } } -//line views/stuff.qtpl:188 +//line views/stuff.qtpl:189 qw422016.N().S(`

    Admins

      `) -//line views/stuff.qtpl:191 +//line views/stuff.qtpl:192 for _, name := range admins { -//line views/stuff.qtpl:191 +//line views/stuff.qtpl:192 qw422016.N().S(`
    1. `) -//line views/stuff.qtpl:192 +//line views/stuff.qtpl:193 qw422016.E().S(name) -//line views/stuff.qtpl:192 +//line views/stuff.qtpl:193 qw422016.N().S(`
    2. `) -//line views/stuff.qtpl:193 +//line views/stuff.qtpl:194 } -//line views/stuff.qtpl:193 +//line views/stuff.qtpl:194 qw422016.N().S(`

    Moderators

      `) -//line views/stuff.qtpl:197 +//line views/stuff.qtpl:198 for _, name := range moderators { -//line views/stuff.qtpl:197 +//line views/stuff.qtpl:198 qw422016.N().S(`
    1. `) -//line views/stuff.qtpl:198 +//line views/stuff.qtpl:199 qw422016.E().S(name) -//line views/stuff.qtpl:198 +//line views/stuff.qtpl:199 qw422016.N().S(`
    2. `) -//line views/stuff.qtpl:199 +//line views/stuff.qtpl:200 } -//line views/stuff.qtpl:199 +//line views/stuff.qtpl:200 qw422016.N().S(`

    Editors

      `) -//line views/stuff.qtpl:203 +//line views/stuff.qtpl:204 for _, name := range editors { -//line views/stuff.qtpl:203 +//line views/stuff.qtpl:204 qw422016.N().S(`
    1. `) -//line views/stuff.qtpl:204 +//line views/stuff.qtpl:205 qw422016.E().S(name) -//line views/stuff.qtpl:204 +//line views/stuff.qtpl:205 qw422016.N().S(`
    2. `) -//line views/stuff.qtpl:205 +//line views/stuff.qtpl:206 } -//line views/stuff.qtpl:205 +//line views/stuff.qtpl:206 qw422016.N().S(`
    `) -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 } -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 func WriteUserListHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 StreamUserListHTML(qw422016) -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 } -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 func UserListHTML() string { -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 WriteUserListHTML(qb422016) -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 return qs422016 -//line views/stuff.qtpl:209 +//line views/stuff.qtpl:210 } -//line views/stuff.qtpl:211 +//line views/stuff.qtpl:212 func StreamHyphaListHTML(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:211 +//line views/stuff.qtpl:212 qw422016.N().S(`

    List of hyphae

    This wiki has `) -//line views/stuff.qtpl:215 +//line views/stuff.qtpl:216 qw422016.N().D(hyphae.Count()) -//line views/stuff.qtpl:215 +//line views/stuff.qtpl:216 qw422016.N().S(` hyphae.

      `) -//line views/stuff.qtpl:217 +//line views/stuff.qtpl:218 for h := range hyphae.YieldExistingHyphae() { -//line views/stuff.qtpl:217 +//line views/stuff.qtpl:218 qw422016.N().S(`
    • `) -//line views/stuff.qtpl:219 +//line views/stuff.qtpl:220 qw422016.E().S(util.BeautifulName(h.Name)) -//line views/stuff.qtpl:219 +//line views/stuff.qtpl:220 qw422016.N().S(` `) -//line views/stuff.qtpl:220 +//line views/stuff.qtpl:221 if h.BinaryPath != "" { -//line views/stuff.qtpl:220 +//line views/stuff.qtpl:221 qw422016.N().S(` `) -//line views/stuff.qtpl:221 +//line views/stuff.qtpl:222 qw422016.E().S(filepath.Ext(h.BinaryPath)[1:]) -//line views/stuff.qtpl:221 +//line views/stuff.qtpl:222 qw422016.N().S(` `) -//line views/stuff.qtpl:222 +//line views/stuff.qtpl:223 } -//line views/stuff.qtpl:222 +//line views/stuff.qtpl:223 qw422016.N().S(`
    • `) -//line views/stuff.qtpl:224 +//line views/stuff.qtpl:225 } -//line views/stuff.qtpl:224 +//line views/stuff.qtpl:225 qw422016.N().S(`
    `) -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 } -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 func WriteHyphaListHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 StreamHyphaListHTML(qw422016) -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 } -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 func HyphaListHTML() string { -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 WriteHyphaListHTML(qb422016) -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 return qs422016 -//line views/stuff.qtpl:228 +//line views/stuff.qtpl:229 } -//line views/stuff.qtpl:230 +//line views/stuff.qtpl:231 func StreamAboutHTML(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:230 +//line views/stuff.qtpl:231 qw422016.N().S(`

    About `) -//line views/stuff.qtpl:234 +//line views/stuff.qtpl:235 qw422016.E().S(cfg.WikiName) -//line views/stuff.qtpl:234 +//line views/stuff.qtpl:235 qw422016.N().S(`

    See /list for information about hyphae on this wiki.

    `) -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 } -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 func WriteAboutHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 StreamAboutHTML(qw422016) -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 } -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 func AboutHTML() string { -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 WriteAboutHTML(qb422016) -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 return qs422016 -//line views/stuff.qtpl:252 +//line views/stuff.qtpl:253 } -//line views/stuff.qtpl:254 +//line views/stuff.qtpl:255 func StreamCommonScripts(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:254 +//line views/stuff.qtpl:255 qw422016.N().S(` `) -//line views/stuff.qtpl:255 +//line views/stuff.qtpl:256 for _, scriptPath := range cfg.CommonScripts { -//line views/stuff.qtpl:255 +//line views/stuff.qtpl:256 qw422016.N().S(` `) -//line views/stuff.qtpl:257 +//line views/stuff.qtpl:258 } -//line views/stuff.qtpl:257 +//line views/stuff.qtpl:258 qw422016.N().S(` `) -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 } -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 func WriteCommonScripts(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 StreamCommonScripts(qw422016) -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 } -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 func CommonScripts() string { -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 WriteCommonScripts(qb422016) -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 return qs422016 -//line views/stuff.qtpl:258 +//line views/stuff.qtpl:259 }