markdown-ui 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +48 -0
- data/.travis.yml +3 -0
- data/Changelog +5 -0
- data/README.md +9 -3
- data/exe/markdown-ui +1 -1
- data/lib/markdown-ui.rb +8 -8
- data/lib/markdown-ui/button/animated.rb +2 -2
- data/lib/markdown-ui/button/basic.rb +1 -1
- data/lib/markdown-ui/button/custom.rb +1 -1
- data/lib/markdown-ui/button/element.rb +3 -3
- data/lib/markdown-ui/button/focusable.rb +2 -2
- data/lib/markdown-ui/button/group/buttons/custom.rb +1 -1
- data/lib/markdown-ui/button/group/buttons/element.rb +1 -1
- data/lib/markdown-ui/button/group/buttons/icon.rb +1 -1
- data/lib/markdown-ui/button/group/buttons/standard.rb +1 -1
- data/lib/markdown-ui/button/icon.rb +1 -1
- data/lib/markdown-ui/button/labeled_icon.rb +1 -1
- data/lib/markdown-ui/button/standard.rb +1 -1
- data/lib/markdown-ui/container/alignment/center.rb +1 -1
- data/lib/markdown-ui/container/alignment/left.rb +1 -1
- data/lib/markdown-ui/container/alignment/right.rb +1 -1
- data/lib/markdown-ui/container/custom.rb +1 -1
- data/lib/markdown-ui/container/element.rb +1 -1
- data/lib/markdown-ui/container/standard.rb +1 -1
- data/lib/markdown-ui/container/text.rb +1 -1
- data/lib/markdown-ui/content/custom.rb +1 -1
- data/lib/markdown-ui/content/header.rb +1 -1
- data/lib/markdown-ui/content/icon.rb +1 -1
- data/lib/markdown-ui/content/item.rb +1 -1
- data/lib/markdown-ui/content/list.rb +1 -1
- data/lib/markdown-ui/content/parser.rb +4 -4
- data/lib/markdown-ui/content/text.rb +1 -1
- data/lib/markdown-ui/grid/column/column.rb +1 -1
- data/lib/markdown-ui/grid/grid.rb +1 -1
- data/lib/markdown-ui/grid/row/row.rb +1 -1
- data/lib/markdown-ui/header/header.rb +2 -2
- data/lib/markdown-ui/label/custom.rb +1 -1
- data/lib/markdown-ui/label/element.rb +3 -3
- data/lib/markdown-ui/menu/custom.rb +1 -1
- data/lib/markdown-ui/menu/element.rb +3 -3
- data/lib/markdown-ui/menu/pagination.rb +1 -1
- data/lib/markdown-ui/menu/pointing.rb +1 -1
- data/lib/markdown-ui/menu/secondary.rb +1 -1
- data/lib/markdown-ui/menu/standard.rb +1 -1
- data/lib/markdown-ui/menu/tabular.rb +1 -1
- data/lib/markdown-ui/menu/text.rb +1 -1
- data/lib/markdown-ui/menu/vertical.rb +1 -1
- data/lib/markdown-ui/message/custom_message.rb +1 -1
- data/lib/markdown-ui/message/list_message.rb +1 -1
- data/lib/markdown-ui/message/message.rb +2 -2
- data/lib/markdown-ui/message/standard_message.rb +1 -1
- data/lib/markdown-ui/segment/custom_segment.rb +1 -1
- data/lib/markdown-ui/segment/horizontal_segment.rb +1 -1
- data/lib/markdown-ui/segment/padded_segment.rb +1 -1
- data/lib/markdown-ui/segment/piled_segment.rb +1 -1
- data/lib/markdown-ui/segment/segment.rb +1 -1
- data/lib/markdown-ui/segment/stacked_segment.rb +1 -1
- data/lib/markdown-ui/segment/standard_segment.rb +1 -1
- data/lib/markdown-ui/segment/vertical_segment.rb +1 -1
- data/lib/markdown-ui/tag/custom_tag.rb +2 -2
- data/lib/markdown-ui/tag/item_tag.rb +3 -3
- data/lib/markdown-ui/tag/list_tag.rb +3 -3
- data/lib/markdown-ui/tag/span_tag.rb +3 -3
- data/lib/markdown-ui/tag/standard_tag.rb +3 -3
- data/lib/markdown-ui/tag/tag.rb +1 -1
- data/lib/markdown-ui/utils/klass_util.rb +3 -3
- data/lib/markdown-ui/version.rb +1 -1
- data/markdown-ui.gemspec +1 -0
- data/website/index.html +100 -14
- data/website/index.md +93 -36
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dcba2629af4d329f6aa5f684597759b4ad854f3
|
4
|
+
data.tar.gz: 70e1b8f199c0ff6246d93197fc0be1088598865c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83de2e442063fdb4b03fcebcfc4b072fa4a88263e96bd372ba97baf6b42ac158910feb20aa3d80d91bf65195db734fe9ca4481c681412408810cf7ac1471d78e
|
7
|
+
data.tar.gz: 2d6d3fb86ee84f7e5b0e6c94580d5cc1fa481bd18037e5a1e5ece07b0e180a61d7d587b08e26db400df6b75d4ae13c6842a93c7be4ccd97672b6baf25ae44b3d
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# This is a sample .codeclimate.yml configured for Engine analysis on Code
|
2
|
+
# Climate Platform For an overview of the Code Climate Platform, see here:
|
3
|
+
# http://docs.codeclimate.com/article/300-the-codeclimate-platform
|
4
|
+
|
5
|
+
# Under the engines key, you can configure which engines will analyze your repo.
|
6
|
+
# Each key is an engine name. For each value, you need to specify enabled: true
|
7
|
+
# to enable the engine as well as any other engines-specific configuration.
|
8
|
+
|
9
|
+
# For more details, see here:
|
10
|
+
# http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
|
11
|
+
|
12
|
+
# For a list of all available engines, see here:
|
13
|
+
# http://docs.codeclimate.com/article/296-engines-available-engines
|
14
|
+
|
15
|
+
engines:
|
16
|
+
# to turn on an engine, add it here and set enabled to `true`
|
17
|
+
# to turn off an engine, set enabled to `false` or remove it
|
18
|
+
rubocop:
|
19
|
+
enabled: true
|
20
|
+
golint:
|
21
|
+
enabled: true
|
22
|
+
gofmt:
|
23
|
+
enabled: true
|
24
|
+
eslint:
|
25
|
+
enabled: true
|
26
|
+
csslint:
|
27
|
+
enabled: true
|
28
|
+
|
29
|
+
# Engines can analyze files and report issues on them, but you can separately
|
30
|
+
# decide which files will receive ratings based on those issues. This is
|
31
|
+
# specified by path patterns under the ratings key.
|
32
|
+
|
33
|
+
# For more details see here:
|
34
|
+
# http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
|
35
|
+
|
36
|
+
ratings:
|
37
|
+
paths:
|
38
|
+
# - app/**
|
39
|
+
- lib/**
|
40
|
+
# - "**.rb"
|
41
|
+
# - "**.go"
|
42
|
+
|
43
|
+
# You can globally exclude files from being analyzed by any engine using the
|
44
|
+
# exclude_paths key.
|
45
|
+
|
46
|
+
exclude_paths:
|
47
|
+
- spec/**
|
48
|
+
- vendor/**
|
data/.travis.yml
CHANGED
data/Changelog
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
[![
|
2
|
-
|
1
|
+
[![Join the chat at https://gitter.im/jjuliano/markdown-ui](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jjuliano/markdown-ui?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
2
|
+
|
3
|
+
[![Code Climate](https://codeclimate.com/repos/55af40bfe30ba04297004e5b/badges/9a3000a8f7f20e930c56/gpa.svg)](https://codeclimate.com/repos/55af40bfe30ba04297004e5b/feed) [![Build Status](https://travis-ci.org/jjuliano/markdown-ui.svg)](https://travis-ci.org/jjuliano/markdown-ui) [![Test Coverage](https://codeclimate.com/repos/55af40bfe30ba04297004e5b/badges/9a3000a8f7f20e930c56/coverage.svg)](https://codeclimate.com/repos/55af40bfe30ba04297004e5b/coverage) [![Gem Version](https://badge.fury.io/rb/markdown-ui.svg)](http://badge.fury.io/rb/markdown-ui)
|
3
4
|
|
5
|
+
# Markdown UI
|
4
6
|
|
5
7
|
Write UI in Markdown Syntax. See http://jjuliano.github.io/markdown-ui/
|
6
8
|
|
@@ -10,7 +12,7 @@ Write UI in Markdown Syntax. See http://jjuliano.github.io/markdown-ui/
|
|
10
12
|
|
11
13
|
## Usage
|
12
14
|
|
13
|
-
$ markdown-ui file.
|
15
|
+
$ markdown-ui file.mdui
|
14
16
|
|
15
17
|
## Contributing
|
16
18
|
|
@@ -19,3 +21,7 @@ Write UI in Markdown Syntax. See http://jjuliano.github.io/markdown-ui/
|
|
19
21
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
20
22
|
4. Push to the branch (`git push origin my-new-feature`)
|
21
23
|
5. Create a new Pull Request
|
24
|
+
|
25
|
+
|
26
|
+
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/jjuliano/markdown-ui/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|
27
|
+
|
data/exe/markdown-ui
CHANGED
@@ -15,7 +15,7 @@ puts <<-EOS
|
|
15
15
|
<head>
|
16
16
|
<meta charset="utf-8">
|
17
17
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
18
|
-
<meta name="viewport" content="width=device-width, initial-scale=1
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
|
19
19
|
|
20
20
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.1/semantic.min.css">
|
21
21
|
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
|
data/lib/markdown-ui.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# coding: UTF-8
|
2
|
-
require
|
2
|
+
require 'markdown-ui/version'
|
3
3
|
|
4
4
|
require 'redcarpet'
|
5
5
|
require 'nokogiri'
|
@@ -22,17 +22,17 @@ module MarkdownUI
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def double_emphasis(text)
|
25
|
-
args = text.split(
|
26
|
-
element = args[0].split(
|
25
|
+
args = text.split('|')
|
26
|
+
element = args[0].split(' ')
|
27
27
|
|
28
28
|
content = if args[1].strip =~ /\,/
|
29
|
-
args[1].split(
|
29
|
+
args[1].split(',')
|
30
30
|
else
|
31
31
|
args[1].strip
|
32
32
|
end if !args[1].nil?
|
33
33
|
|
34
34
|
klass = if args[0].strip =~ /\./
|
35
|
-
k = args[0].split(
|
35
|
+
k = args[0].split('.')
|
36
36
|
k.reverse!
|
37
37
|
k.shift
|
38
38
|
end
|
@@ -42,7 +42,7 @@ module MarkdownUI
|
|
42
42
|
data_attributes = !args[3].nil? ? args[3].downcase : nil
|
43
43
|
|
44
44
|
html do
|
45
|
-
case element.join(
|
45
|
+
case element.join(' ')
|
46
46
|
when /button/i
|
47
47
|
MarkdownUI::Button::Element.new(element, content, klass, _id).render
|
48
48
|
when /menu/i
|
@@ -85,7 +85,7 @@ module MarkdownUI
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def list(content, list_type)
|
88
|
-
klass =
|
88
|
+
klass = 'ui'
|
89
89
|
html { MarkdownUI::Content::List.new(content, klass, list_type).render }
|
90
90
|
end
|
91
91
|
|
@@ -103,7 +103,7 @@ module MarkdownUI
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def table_cell(content, alignment)
|
106
|
-
body, klass = content.split(
|
106
|
+
body, klass = content.split(':')
|
107
107
|
|
108
108
|
"<div class=\"ui #{klass}column\">#{body}</div>"
|
109
109
|
end
|
@@ -6,7 +6,7 @@ module MarkdownUI::Button
|
|
6
6
|
@content = content
|
7
7
|
@klass = klass
|
8
8
|
@id = _id
|
9
|
-
@visible_content, @hidden_content = content.is_a?(Array) ? content : content.split(
|
9
|
+
@visible_content, @hidden_content = content.is_a?(Array) ? content : content.split(';')
|
10
10
|
end
|
11
11
|
|
12
12
|
def render
|
@@ -27,4 +27,4 @@ module MarkdownUI::Button
|
|
27
27
|
MarkdownUI::StandardTag.new(content.join, klass, _id).render
|
28
28
|
end
|
29
29
|
end
|
30
|
-
end
|
30
|
+
end
|
@@ -11,13 +11,13 @@ module MarkdownUI::Button
|
|
11
11
|
element = if @element.is_a? Array
|
12
12
|
@element
|
13
13
|
else
|
14
|
-
@element.split(
|
14
|
+
@element.split(' ')
|
15
15
|
end
|
16
16
|
|
17
17
|
content = @content
|
18
18
|
|
19
19
|
klass = if @klass.nil?
|
20
|
-
element.join(
|
20
|
+
element.join(' ').strip
|
21
21
|
else
|
22
22
|
@klass
|
23
23
|
end
|
@@ -59,4 +59,4 @@ module MarkdownUI::Button
|
|
59
59
|
end
|
60
60
|
|
61
61
|
end
|
62
|
-
end
|
62
|
+
end
|
@@ -12,7 +12,7 @@ module MarkdownUI::Button
|
|
12
12
|
content = MarkdownUI::Content::Parser.new(@content).parse
|
13
13
|
klass = MarkdownUI::KlassUtil.new("ui #{@klass} button").klass
|
14
14
|
_id = if @id
|
15
|
-
" id=\"#{@id.split.join(
|
15
|
+
" id=\"#{@id.split.join('-')}\""
|
16
16
|
end
|
17
17
|
|
18
18
|
output = []
|
@@ -25,4 +25,4 @@ module MarkdownUI::Button
|
|
25
25
|
output.join
|
26
26
|
end
|
27
27
|
end
|
28
|
-
end
|
28
|
+
end
|
@@ -13,14 +13,14 @@ module MarkdownUI
|
|
13
13
|
final_content = []
|
14
14
|
|
15
15
|
@content.each do |c|
|
16
|
-
content = c.split(
|
16
|
+
content = c.split(':')
|
17
17
|
final_content << process(content)
|
18
18
|
end
|
19
19
|
|
20
20
|
final_content.join
|
21
21
|
else
|
22
22
|
content = if !(@content =~ /\:/).nil?
|
23
|
-
@content.split(
|
23
|
+
@content.split(':')
|
24
24
|
else
|
25
25
|
@content.split("\n")
|
26
26
|
end
|
@@ -57,10 +57,10 @@ module MarkdownUI
|
|
57
57
|
elsif mode.list?
|
58
58
|
MarkdownUI::Content::List.new(actual_content, klass).render
|
59
59
|
else
|
60
|
-
MarkdownUI::Content::Custom.new(content.join(
|
60
|
+
MarkdownUI::Content::Custom.new(content.join(' '), klass).render
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
64
|
end
|
65
65
|
end
|
66
|
-
end
|
66
|
+
end
|