Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
db829f86
Commit
db829f86
authored
Jan 07, 2014
by
Chris Rebert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for '//===' for <h3>s in bs-lessdoc
parent
39861714
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
21 deletions
+71
-21
docs/_includes/customizer-variables.html
docs/_includes/customizer-variables.html
+1
-3
docs/customizer-variables.jade
docs/customizer-variables.jade
+14
-11
docs/grunt/bs-lessdoc-parser.js
docs/grunt/bs-lessdoc-parser.js
+55
-6
less/variables.less
less/variables.less
+1
-1
No files found.
docs/_includes/customizer-variables.html
View file @
db829f86
...
...
@@ -726,9 +726,7 @@
</div>
<h2
id=
"navs"
>
Navs
</h2>
<p></p>
<div
class=
"row"
>
</div>
<h2
id=
"shared-nav-styles"
>
Shared nav styles
</h2>
<h3
id=
"shared-nav-styles"
>
Shared nav styles
</h3>
<div
class=
"row"
>
<div
class=
"bs-customizer-input"
>
<label
for=
"input-@nav-link-padding"
>
@nav-link-padding
</label>
...
...
docs/customizer-variables.jade
View file @
db829f86
...
...
@@ -4,15 +4,18 @@ each section in sections
h2(id=section.id)= section.heading
if section.docstring
p!= section.docstring.html
div.row
each variable in section.variables
div.bs-customizer-input
label(for="input-" + variable.name)= variable.name
input.form-control(
id="input-" + variable.name
type="text"
value=variable.defaultValue
data-var=variable.name)
if variable.docstring
p.help-block!= variable.docstring.html
each subsection in section.subsections
if subsection.heading
h3(id=subsection.id)= subsection.heading
div.row
each variable in subsection.variables
div.bs-customizer-input
label(for="input-" + variable.name)= variable.name
input.form-control(
id="input-" + variable.name
type="text"
value=variable.defaultValue
data-var=variable.name)
if variable.docstring
p.help-block!= variable.docstring.html
// NOTE: DO NOT EDIT THE PRECEDING SECTION DIRECTLY! It is autogenerated via the `build-customizer-vars-form` Grunt task using the customizer-variables.jade template.
docs/grunt/bs-lessdoc-parser.js
View file @
db829f86
...
...
@@ -24,6 +24,7 @@ Mini-language:
var
CUSTOMIZABLE_HEADING
=
/^
[/]{2}
=
{2}(
.*
)
$/
;
var
UNCUSTOMIZABLE_HEADING
=
/^
[/]{2}
-
{2}(
.*
)
$/
;
var
SUBSECTION_HEADING
=
/^
[/]{2}
=
{3}(
.*
)
$/
;
var
SECTION_DOCSTRING
=
/^
[/]{2}
#
{2}(
.*
)
$/
;
var
VAR_ASSIGNMENT
=
/^
(
@
[
a-zA-Z0-9_-
]
+
)
:
[
]
*
([^
;
][^
;
]
+
)
;
[
]
*$/
;
var
VAR_DOCSTRING
=
/^
[/]{2}[
*
]{2}(
.*
)
$/
;
...
...
@@ -33,12 +34,23 @@ function Section(heading, customizable) {
this
.
id
=
this
.
heading
.
replace
(
/
\s
+/g
,
'
-
'
).
toLowerCase
();
this
.
customizable
=
customizable
;
this
.
docstring
=
null
;
this
.
subsections
=
[];
}
Section
.
prototype
.
addSubSection
=
function
(
subsection
)
{
this
.
subsections
.
push
(
subsection
);
}
function
SubSection
(
heading
)
{
this
.
heading
=
heading
.
trim
();
this
.
id
=
this
.
heading
.
replace
(
/
\s
+/g
,
'
-
'
).
toLowerCase
();
this
.
variables
=
[];
this
.
addVar
=
function
(
variable
)
{
this
.
variables
.
push
(
variable
);
};
}
SubSection
.
prototype
.
addVar
=
function
(
variable
)
{
this
.
variables
.
push
(
variable
);
};
function
VarDocstring
(
markdownString
)
{
this
.
html
=
markdown2html
(
markdownString
);
}
...
...
@@ -78,6 +90,10 @@ Tokenizer.prototype._shift = function () {
}
var
line
=
this
.
_lines
.
shift
();
var
match
=
null
;
match
=
SUBSECTION_HEADING
.
exec
(
line
);
if
(
match
!==
null
)
{
return
new
SubSection
(
match
[
1
]);
}
match
=
CUSTOMIZABLE_HEADING
.
exec
(
line
);
if
(
match
!==
null
)
{
return
new
Section
(
match
[
1
],
true
);
...
...
@@ -146,17 +162,50 @@ Parser.prototype.parseSection = function () {
else
{
this
.
_tokenizer
.
unshift
(
docstring
);
}
this
.
parseVars
(
section
);
this
.
parseSubSections
(
section
);
return
section
;
};
Parser
.
prototype
.
parseVars
=
function
(
section
)
{
Parser
.
prototype
.
parseSubSections
=
function
(
section
)
{
while
(
true
)
{
var
subsection
=
this
.
parseSubSection
();
if
(
subsection
===
null
)
{
if
(
section
.
subsections
.
length
===
0
)
{
// Presume an implicit initial subsection
subsection
=
new
SubSection
(
''
);
this
.
parseVars
(
subsection
);
}
else
{
break
;
}
}
section
.
addSubSection
(
subsection
);
}
if
(
section
.
subsections
.
length
===
1
&&
!
(
section
.
subsections
[
0
].
heading
)
&&
section
.
subsections
[
0
].
variables
.
length
===
0
)
{
// Ignore lone empty implicit subsection
section
.
subsections
=
[];
}
};
Parser
.
prototype
.
parseSubSection
=
function
()
{
var
subsection
=
this
.
_tokenizer
.
shift
();
if
(
subsection
instanceof
SubSection
)
{
this
.
parseVars
(
subsection
);
return
subsection
;
}
this
.
_tokenizer
.
unshift
(
subsection
);
return
null
;
};
Parser
.
prototype
.
parseVars
=
function
(
subsection
)
{
while
(
true
)
{
var
variable
=
this
.
parseVar
();
if
(
variable
===
null
)
{
return
;
}
section
.
addVar
(
variable
);
s
ubs
ection
.
addVar
(
variable
);
}
};
...
...
less/variables.less
View file @
db829f86
...
...
@@ -366,7 +366,7 @@
//
//##
//== Shared nav styles
//==
=
Shared nav styles
@nav-link-padding: 10px 15px;
@nav-link-hover-bg: @gray-lighter;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment