12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- MarkGone a minimal markup language based on godoc
- MarkGone uses the minimal formatting syntax from godoc.
- Unlike godoc, MarkGone processes plain text, not comments in go source code;
- Philosophy
- Markups are gone.
- In other words, MarkGone text just looks like plain text.
- Formatting Syntax
- A heading is a single line
- followed by another paragraph,
- beginning with a capital letter,
- and containing no punctuation.
- Paragraphs are separated by one or more blank lines.
- To produce a pre-formatted blocks,
- simply indent every line of the block.
- Common indent prefix will be removed in output.
- http://example.com/urls_are_auto-linked
- Source Code HighLight
- MarkGone does not highlight pre-formatted blocks.
- The highlighting can be done via JavaScript.
- For example, with highlight.js:
- <link rel="stylesheet" href="/path/to/styles/default.css">
- <script src="/path/to/highlight.pack.js"></script>
- <script>
- document.addEventListener('load', () => {
- hljs.configure({languages: ["go", "c", "scheme", "java", "js", "html", "css"]});
- const codes = document.querySelectorAll('pre');
- codes.forEach((code) => { hljs.highlightBlock(code); });
- });
- </script>
- CSS
- Since markgone only uses four HTML elements
- h2, h3, p, pre
- customizing css style for it is simple.
- Sample css files are provided in the css directory of source code repository:
- []struct{
- filename string;
- description string;
- }{
- {"godoc.css":
- "mimic godoc style"},
- {"plain/blue-link":
- "mimic plain text with colored links"},
- {"plain/underline-link":
- "mimic plain text with underlined links"},
- {"plain/white-on-black":
- "mimic a console"},
- {"plain/green-on-black":
- "mimic a console with green text"},
- }
- Extensions
- If the first line is a single line, i.e. followed by a blank line,
- then MarkGone uses it as the title.
- Tags: space-separated tags on last line following at least one blank-line
|