Socket
Book a DemoInstallSign in
Socket

notabug.org/icock/markgone

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notabug.org/icock/markgone

Go Modules
Version
v0.0.0-20170702155811-ea907c4ea2ff
Version published
Created
Source

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

FAQs

Package last updated on 02 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts