mirror of https://github.com/hamaluik/mkbook
added sub-chapters
parent
153981379b
commit
628426bed9
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,631 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: SCSS
|
||||||
|
file_extensions:
|
||||||
|
- scss
|
||||||
|
scope: source.scss
|
||||||
|
|
||||||
|
variables:
|
||||||
|
unicode: '\\\h{1,6}[ \t\n\f]?'
|
||||||
|
escape: '(?:{{unicode}}|\\[^\n\f\h])'
|
||||||
|
nonascii: '[\p{L}\p{M}\p{S}\p{N}&&[^[:ascii:]]]'
|
||||||
|
nmstart: '(?:[[_a-zA-Z]{{nonascii}}]|{{escape}})'
|
||||||
|
nmchar: '(?:[[-\w]{{nonascii}}]|{{escape}})'
|
||||||
|
ident: '(?:--{{nmchar}}+|-?{{nmstart}}{{nmchar}}*)'
|
||||||
|
|
||||||
|
combinators: '(?:>{1,3}|[~+])'
|
||||||
|
|
||||||
|
element_names: '\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdi|bdo|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|content|data|datalist|dd|del|details|dfn|dir|dialog|div|dl|dt|element|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|h[1-6]|head|header|hgroup|hr|html|i|iframe|img|input|ins|isindex|kbd|keygen|label|legend|li|link|main|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|rp|rt|rtc|s|samp|script|section|select|shadow|small|source|span|strike|strong|style|sub|summary|sup|svg|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr|xmp|circle|clipPath|defs|ellipse|filter|foreignObject|g|glyph|glyphRef|image|line|linearGradient|marker|mask|path|pattern|polygon|polyline|radialGradient|rect|stop|switch|symbol|text|textPath|tref|tspan|use)\b'
|
||||||
|
|
||||||
|
custom_element_chars: |-
|
||||||
|
(?x:
|
||||||
|
[-_a-z0-9\x{00B7}]
|
||||||
|
| \\\.
|
||||||
|
| [\x{00C0}-\x{00D6}]
|
||||||
|
| [\x{00D8}-\x{00F6}]
|
||||||
|
| [\x{00F8}-\x{02FF}]
|
||||||
|
| [\x{0300}-\x{037D}]
|
||||||
|
| [\x{037F}-\x{1FFF}]
|
||||||
|
| [\x{200C}-\x{200D}]
|
||||||
|
| [\x{203F}-\x{2040}]
|
||||||
|
| [\x{2070}-\x{218F}]
|
||||||
|
| [\x{2C00}-\x{2FEF}]
|
||||||
|
| [\x{3001}-\x{D7FF}]
|
||||||
|
| [\x{F900}-\x{FDCF}]
|
||||||
|
| [\x{FDF0}-\x{FFFD}]
|
||||||
|
| [\x{10000}-\x{EFFFF}]
|
||||||
|
)
|
||||||
|
custom_elements: '\b([a-z](?:{{custom_element_chars}})*-(?:{{custom_element_chars}})*)\b(?!{{ident}})'
|
||||||
|
|
||||||
|
pseudo_elements: |-
|
||||||
|
(?x:
|
||||||
|
(:{1,2})(?:before|after|first-line|first-letter) # CSS1 & CSS2 require : or ::
|
||||||
|
| (::)(-(?:moz|ms|webkit)-)?(?:{{ident}}) # CSS3 requires ::
|
||||||
|
)\b
|
||||||
|
|
||||||
|
regular_pseudo_classes: '\b(active|any-link|blank|checked|current|default|defined|disabled|drop|empty|enabled|first|first-child|first-of-type|fullscreen|future|focus|focus-visible|focus-within|host|hover|indeterminate|in-range|invalid|last-child|last-of-type|left|link|local-link|only-child|only-of-type|optional|out-of-range|past|placeholder-shown|read-only|read-write|required|right|root|scope|target|target-within|user-invalid|valid|visited)\b(?![-])'
|
||||||
|
functional_pseudo_classes: '\b(dir|lang|matches|not|has|drop|nth-last-child|nth-child|nth-last-of-type|nth-of-type)\b'
|
||||||
|
|
||||||
|
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- include: Sass.sublime-syntax#frontmatter
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- include: Sass.sublime-syntax#selectors
|
||||||
|
- include: properties
|
||||||
|
- include: Sass.sublime-syntax#keyframe-operators
|
||||||
|
- include: Sass.sublime-syntax#interpolated-selectors
|
||||||
|
- include: Sass.sublime-syntax#custom-element-selectors
|
||||||
|
- include: at-rules
|
||||||
|
- include: curly-braces
|
||||||
|
- match: '\s*(,)\s*'
|
||||||
|
captures:
|
||||||
|
1: punctuation.separator.css
|
||||||
|
|
||||||
|
|
||||||
|
properties:
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- match: '\b(font-family|font|family)\b(?=\s*:)'
|
||||||
|
scope: meta.property-name.css support.type.property-name.css
|
||||||
|
push:
|
||||||
|
- match: '(\s*)(;)'
|
||||||
|
pop: true
|
||||||
|
captures:
|
||||||
|
1: meta.property-value.css
|
||||||
|
2: punctuation.terminator.rule.css
|
||||||
|
- match: '(?=\s*[;})])'
|
||||||
|
pop: true
|
||||||
|
- match: ':'
|
||||||
|
scope: punctuation.separator.key-value.css
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.property-value.css
|
||||||
|
- match: '(?=\s*([;})]))'
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#numeric-values
|
||||||
|
- include: Sass.sublime-syntax#property-value-constants
|
||||||
|
- include: Sass.sublime-syntax#var-function
|
||||||
|
- include: Sass.sublime-syntax#sass-maps
|
||||||
|
- include: Sass.sublime-syntax#sass-variables
|
||||||
|
- include: Sass.sublime-syntax#sass-functions
|
||||||
|
- include: Sass.sublime-syntax#sass-custom-functions
|
||||||
|
- match: '{{ident}}(\s+{{ident}})*\b(?!:)'
|
||||||
|
scope: string.unquoted.css
|
||||||
|
- include: Sass.sublime-syntax#literal-string
|
||||||
|
- include: Sass.sublime-syntax#unquoted-concatenated-string
|
||||||
|
- include: Sass.sublime-syntax#sass-operators
|
||||||
|
- match: '\s*(,)\s*'
|
||||||
|
captures:
|
||||||
|
1: punctuation.separator.css
|
||||||
|
- match: '(?={)'
|
||||||
|
pop: true
|
||||||
|
- match: ''
|
||||||
|
pop: true
|
||||||
|
- match: |-
|
||||||
|
\b(?x)(
|
||||||
|
display|width|background-color|height|position|font-family|font-weight
|
||||||
|
| top|opacity|cursor|background-image|right|visibility|box-sizing
|
||||||
|
| user-select|left|float|margin-left|margin-top|line-height
|
||||||
|
| padding-left|z-index|margin-bottom|margin-right|margin
|
||||||
|
| vertical-align|padding-top|white-space|border-radius|padding-bottom
|
||||||
|
| padding-right|padding|bottom|clear|max-width|box-shadow|content
|
||||||
|
| border-color|min-height|min-width|font-style|border-width
|
||||||
|
| border-collapse|background-size|text-overflow|max-height|text-transform
|
||||||
|
| text-shadow|text-indent|border-style|overflow-y|list-style-type
|
||||||
|
| word-wrap|border-spacing|appearance|zoom|overflow-x|border-top-left-radius
|
||||||
|
| border-bottom-left-radius|border-top-color|pointer-events
|
||||||
|
| border-bottom-color|align-items|justify-content|letter-spacing
|
||||||
|
| border-top-right-radius|border-bottom-right-radius|border-right-width
|
||||||
|
| font-smoothing|border-bottom-width|border-right-color|direction
|
||||||
|
| border-top-width|src|border-left-color|border-left-width
|
||||||
|
| tap-highlight-color|table-layout|background-clip|word-break
|
||||||
|
| transform-origin|resize|filter|backdrop-filter|backface-visibility|text-rendering
|
||||||
|
| box-orient|transition-property|transition-duration|word-spacing
|
||||||
|
| quotes|outline-offset|animation-timing-function|animation-duration
|
||||||
|
| animation-name|transition-timing-function|border-bottom-style
|
||||||
|
| border-bottom|transition-delay|transition|unicode-bidi|border-top-style
|
||||||
|
| border-top|unicode-range|list-style-position|orphans|outline-width
|
||||||
|
| line-clamp|order|flex-direction|box-pack|animation-fill-mode
|
||||||
|
| outline-color|list-style-image|list-style|touch-action|flex-grow
|
||||||
|
| border-left-style|border-left|animation-iteration-count
|
||||||
|
| page-break-inside|box-flex|box-align|page-break-after|animation-delay
|
||||||
|
| widows|border-right-style|border-right|flex-align|outline-style
|
||||||
|
| outline|background-origin|animation-direction|fill-opacity
|
||||||
|
| background-attachment|flex-wrap|transform-style|counter-increment
|
||||||
|
| overflow-wrap|counter-reset|animation-play-state|animation
|
||||||
|
| will-change|box-ordinal-group|image-rendering|mask-image|flex-flow
|
||||||
|
| background-position-y|stroke-width|background-position-x|background-position
|
||||||
|
| background-blend-mode|flex-shrink|flex-basis|flex-order|flex-item-align
|
||||||
|
| flex-line-pack|flex-negative|flex-pack|flex-positive|flex-preferred-size
|
||||||
|
| flex|user-drag|font-stretch|column-count|empty-cells|align-self
|
||||||
|
| caption-side|mask-size|column-gap|mask-repeat|box-direction
|
||||||
|
| font-feature-settings|mask-position|align-content|object-fit
|
||||||
|
| columns|text-fill-color|clip-path|stop-color|font-kerning
|
||||||
|
| page-break-before|stroke-dasharray|size|fill-rule|border-image-slice
|
||||||
|
| column-width|break-inside|column-break-before|border-image-width
|
||||||
|
| stroke-dashoffset|border-image-repeat|border-image-outset|line-break
|
||||||
|
| stroke-linejoin|stroke-linecap|stroke-miterlimit|stroke-opacity
|
||||||
|
| stroke|shape-rendering|border-image-source|border-image|border
|
||||||
|
| tab-size|writing-mode|perspective-origin-y|perspective-origin-x
|
||||||
|
| perspective-origin|perspective|text-align-last|text-align|clip-rule
|
||||||
|
| clip|text-anchor|column-rule-color|box-decoration-break|column-fill
|
||||||
|
| fill|column-rule-style|mix-blend-mode|text-emphasis-color
|
||||||
|
| baseline-shift|dominant-baseline|page|alignment-baseline
|
||||||
|
| column-rule-width|column-rule|break-after|font-variant-ligatures
|
||||||
|
| transform-origin-y|transform-origin-x|transform|object-position
|
||||||
|
| break-before|column-span|isolation|shape-outside|all
|
||||||
|
| color-interpolation-filters|marker|marker-end|marker-start
|
||||||
|
| marker-mid|color-rendering|color-interpolation|background-repeat-x
|
||||||
|
| background-repeat-y|background-repeat|background|mask-type
|
||||||
|
| flood-color|flood-opacity|text-orientation|mask-composite
|
||||||
|
| text-emphasis-style|paint-order|lighting-color|shape-margin
|
||||||
|
| text-emphasis-position|text-emphasis|shape-image-threshold
|
||||||
|
| mask-clip|mask-origin|mask|font-variant-caps|font-variant-alternates
|
||||||
|
| font-variant-east-asian|font-variant-numeric|font-variant-position
|
||||||
|
| font-variant|font-size-adjust|font-size|font-language-override
|
||||||
|
| font-display|font-synthesis|font|line-box-contain|text-justify
|
||||||
|
| text-decoration-color|text-decoration-style|text-decoration-line
|
||||||
|
| text-decoration|text-underline-position|grid-template-rows
|
||||||
|
| grid-template-columns|grid-template-areas|grid-template|rotate|scale
|
||||||
|
| translate|scroll-behavior|grid-column-start|grid-column-end
|
||||||
|
| grid-column-gap|grid-row-start|grid-row-end|grid-auto-rows
|
||||||
|
| grid-area|grid-auto-flow|grid-auto-columns|image-orientation
|
||||||
|
| hyphens|overflow-scrolling|overflow|color-profile|kerning
|
||||||
|
| nbsp-mode|color|image-resolution|grid-row-gap|grid-row|grid-column
|
||||||
|
| blend-mode|azimuth|pause-after|pause-before|pause|pitch-range|pitch
|
||||||
|
| text-height|system|negative|prefix|suffix|range|pad|fallback
|
||||||
|
| additive-symbols|symbols|speak-as|speak|grid-gap
|
||||||
|
)\b(?=\s*:)
|
||||||
|
scope: meta.property-name.css support.type.property-name.css
|
||||||
|
push:
|
||||||
|
- include: property-value-wrapper
|
||||||
|
- match: '(-(?:webkit|moz|ms|o)-)({{ident}})(?=\s*:)'
|
||||||
|
captures:
|
||||||
|
0: meta.property-name.css
|
||||||
|
1: support.type.vendor-prefix.css
|
||||||
|
2: support.type.property-name.css
|
||||||
|
push:
|
||||||
|
- include: property-value-wrapper
|
||||||
|
- match: '(\$)([a-zA-Z0-9_-][\w-]*)'
|
||||||
|
captures:
|
||||||
|
0: variable.declaration.sass
|
||||||
|
1: punctuation.definition.variable.sass
|
||||||
|
push:
|
||||||
|
- include: property-value-wrapper
|
||||||
|
- match: '(--)({{nmchar}}+)'
|
||||||
|
captures:
|
||||||
|
0: meta.property-name.css support.type.custom-property.css
|
||||||
|
1: punctuation.definition.custom-property.css
|
||||||
|
2: support.type.custom-property.name.css
|
||||||
|
push:
|
||||||
|
- include: property-value-wrapper
|
||||||
|
# Partial property names, split at "-"
|
||||||
|
# http://sass-lang.com/documentation/file.SASS_REFERENCE.html#nested_properties
|
||||||
|
- match: '\b(z|y|x|writing|wrap|word|will|width|white|weight|visibility|vertical|variant-position|variant-numeric|variant-ligatures|variant-east-asian|variant-caps|variant-alternates|variant|user|unicode|underline-position|underline|type|transition|transform|touch|top-width|top-style|top-right-radius|top-left-radius|top-color|top|timing-function|timing|threshold|text|template-rows|template-columns|template-areas|template|tap|table|tab|synthesis|symbols|style-type|style-position|style-image|style|stroke|stretch|stop|state|start|speak|span|spacing|space|source|smoothing|slice|sizing|size-adjust|size|side|shrink|shift|shape|shadow|settings|self|select|scrolling|scroll|rule-width|rule-style|rule-color|rule|rows|row-start|row-gap|row-end|row|right-width|right-style|right-radius|right-color|right|resolution|reset|repeat-y|repeat-x|repeat|rendering|range|radius|property|profile|preferred-size|preferred|positive|position-y|position-x|position|pointer|play-state|play|pitch|perspective|pause|path|paint|page|padding|pack|override|overflow|outside|outset|outline|origin-y|origin-x|origin|orientation|orient|ordinal-group|ordinal|order|opacity|offset|object|numeric|negative|nbsp|name|mode|mix|miterlimit|min|mid|max|mask|marker|margin|list|linejoin|linecap|line-pack|line|lighting|ligatures|letter|left-width|left-style|left-radius|left-color|left|layout|last|language-override|language|kerning|justify|iteration-count|iteration|items|item-align|item|interpolation-filters|interpolation|inside|index|indent|increment|image-width|image-threshold|image-source|image-slice|image-repeat|image-outset|image|highlight-color|highlight|height|grow|group|grid|gap|function|font|flow|flood|flex|fit|filters|fill-mode|fill-color|fill|feature-settings|feature|family|events|end|empty|emphasis-style|emphasis-position|emphasis-color|emphasis|duration|drag|dominant|display|direction|delay|decoration-style|decoration-line|decoration-color|decoration-break|decoration|dashoffset|dasharray|counter|count|content|contain|composite|columns|column-start|column-gap|column-end|column|color|collapse|clip|clamp|change|cells|caption|caps|break-inside|break-before|break-after|break|box-contain|box|bottom-width|bottom-style|bottom-color|bottom|border|blend-mode|blend|bidi|behavior|before|basis|baseline|background|backface|auto-rows|auto-flow|auto-columns|auto|attachment|as|areas|area|animation|anchor|alternates|alignment|align-last|align|after|adjust|additive|action)\b'
|
||||||
|
scope: meta.property-name.css support.type.property-name.css
|
||||||
|
push:
|
||||||
|
- include: property-value-wrapper
|
||||||
|
- match: '[a-zA-Z0-9_-]*((#)({)((\$)([a-zA-Z0-9_-][\w-]*))(}))[a-zA-Z0-9_-]*'
|
||||||
|
captures:
|
||||||
|
0: meta.property-name.css support.type.property-name
|
||||||
|
1: meta.group.interpolation.sass
|
||||||
|
2: punctuation.definition.variable.sass
|
||||||
|
3: punctuation.definition.group.begin.sass
|
||||||
|
4: variable.other.sass
|
||||||
|
5: punctuation.definition.variable.sass
|
||||||
|
7: punctuation.definition.group.end.sass
|
||||||
|
push:
|
||||||
|
- include: property-value-wrapper
|
||||||
|
|
||||||
|
property-value-wrapper:
|
||||||
|
- match: '(\s*)(;)'
|
||||||
|
pop: true
|
||||||
|
captures:
|
||||||
|
1: meta.property-value.css
|
||||||
|
2: punctuation.terminator.rule.css
|
||||||
|
- match: '(?=\s*[;})])'
|
||||||
|
pop: true
|
||||||
|
- match: '\s*(:)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.separator.key-value.css
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.property-value.css
|
||||||
|
- match: '(?=\s*[;})])'
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#property-values
|
||||||
|
- match: '(?={)'
|
||||||
|
pop: true
|
||||||
|
- match: ''
|
||||||
|
pop: true
|
||||||
|
|
||||||
|
|
||||||
|
at-rules:
|
||||||
|
- match: '(@)(each)\b'
|
||||||
|
scope: keyword.control.flow.sass
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.keyword.sass
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.each.sass
|
||||||
|
- include: Sass.sublime-syntax#sass-variables
|
||||||
|
- include: Sass.sublime-syntax#comma-delimiter
|
||||||
|
- match: '(?={)'
|
||||||
|
pop: true
|
||||||
|
- match: '\b(in)\b'
|
||||||
|
scope: keyword.operator.sass
|
||||||
|
push:
|
||||||
|
- match: '(?={)'
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- include: Sass.sublime-syntax#comma-delimiter
|
||||||
|
- include: Sass.sublime-syntax#var-function
|
||||||
|
- include: Sass.sublime-syntax#sass-variables
|
||||||
|
- include: Sass.sublime-syntax#sass-functions
|
||||||
|
- include: Sass.sublime-syntax#sass-custom-functions
|
||||||
|
- include: Sass.sublime-syntax#sass-interpolation
|
||||||
|
- include: Sass.sublime-syntax#sass-maps
|
||||||
|
- include: Sass.sublime-syntax#unquoted-string
|
||||||
|
- include: Sass.sublime-syntax#sass-operators
|
||||||
|
- match: '(@)(for|while)\b'
|
||||||
|
scope: keyword.control.flow.sass
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.keyword.sass
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.sass
|
||||||
|
- match: '(?={)'
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#sass-script-expression
|
||||||
|
- match: '(@)(if|else if|else)\b'
|
||||||
|
scope: keyword.control.flow.conditional.sass
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.keyword.sass
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.sass
|
||||||
|
- match: '(?={)'
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#sass-script-expression
|
||||||
|
- match: '(@)(debug|warn|error)\b'
|
||||||
|
scope: keyword.control.at-rule.sass
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.keyword.sass
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.sass
|
||||||
|
- match: '(;)'
|
||||||
|
scope: punctuation.terminator.rule.sass
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#sass-script-expression
|
||||||
|
- match: '(@)(at-root)\b'
|
||||||
|
scope: keyword.control.at-rule.at-root.sass
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.keyword.sass
|
||||||
|
- match: '(@)(extend)\b'
|
||||||
|
scope: keyword.control.at-rule.extend.sass
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.keyword.sass
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.extend.sass
|
||||||
|
- match: '(;)'
|
||||||
|
scope: punctuation.terminator.rule.sass
|
||||||
|
pop: true
|
||||||
|
- match: \!\s*(default|global|optional)
|
||||||
|
scope: keyword.other.sass
|
||||||
|
- include: Sass.sublime-syntax#selectors
|
||||||
|
- include: Sass.sublime-syntax#custom-element-selectors
|
||||||
|
|
||||||
|
- match: '((@)(mixin|function))\s+([\w-]+)'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.sass
|
||||||
|
2: punctuation.definition.keyword.sass
|
||||||
|
4: entity.name.function.sass
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function.declaration.sass
|
||||||
|
- match: '\s*(?=[\{;])'
|
||||||
|
pop: true
|
||||||
|
- match: '\('
|
||||||
|
scope: punctuation.definition.group.begin.sass
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function.parameters.sass
|
||||||
|
- match: '\)'
|
||||||
|
scope: punctuation.definition.group.end.sass
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#comma-delimiter
|
||||||
|
- match: '(\$)([a-zA-Z0-9_-][\w-]*)'
|
||||||
|
scope: variable.parameter.sass
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.variable.sass
|
||||||
|
push:
|
||||||
|
- match: '(?=[,\)])'
|
||||||
|
pop: true
|
||||||
|
- match: ':'
|
||||||
|
scope: punctuation.separator.key-value.css
|
||||||
|
- match: '\b(false|true|null)\b'
|
||||||
|
scope: constant.language.sass
|
||||||
|
- include: Sass.sublime-syntax#property-values
|
||||||
|
- match: '\{'
|
||||||
|
scope: punctuation.section.property-list.begin.sass
|
||||||
|
push:
|
||||||
|
- match: '\}'
|
||||||
|
scope: punctuation.section.property-list.end.sass
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
- match: '((@)(include))\s+([\w-]+)'
|
||||||
|
captures:
|
||||||
|
0: variable.function.sass
|
||||||
|
1: keyword.control.at-rule.sass
|
||||||
|
2: punctuation.definition.keyword.sass
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function-call.sass
|
||||||
|
- match: '\s*(;)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.terminator.rule.sass
|
||||||
|
pop: true
|
||||||
|
- match: '\s*(?=[\{;])'
|
||||||
|
pop: true
|
||||||
|
- match: '\('
|
||||||
|
scope: punctuation.definition.group.begin.sass
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function-call.arguments.sass
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- include: Sass.sublime-syntax#sass-variables
|
||||||
|
- include: Sass.sublime-syntax#sass-functions
|
||||||
|
- include: Sass.sublime-syntax#sass-operators
|
||||||
|
- include: Sass.sublime-syntax#comma-delimiter
|
||||||
|
- include: Sass.sublime-syntax#property-values
|
||||||
|
- include: Sass.sublime-syntax#literal-string
|
||||||
|
- match: '{{ident}}'
|
||||||
|
scope: string.unquoted.sass
|
||||||
|
- include: Sass.sublime-syntax#selectors
|
||||||
|
- include: Sass.sublime-syntax#custom-element-selectors
|
||||||
|
- match: '\)'
|
||||||
|
scope: punctuation.definition.group.end.sass
|
||||||
|
pop: true
|
||||||
|
- match: '(@)(return)\b'
|
||||||
|
scope: keyword.control.at-rule.return.sass
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.keyword.sass
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.sass
|
||||||
|
- match: '\s*(;)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.terminator.rule.css
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#property-values
|
||||||
|
- match: '((@)(?:-(?:webkit|moz|o)-)?(charset|namespace|font-face)\b)'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.css
|
||||||
|
2: punctuation.definition.keyword.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.css
|
||||||
|
- match: '\s*(;)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.terminator.rule.sass
|
||||||
|
pop: true
|
||||||
|
- match: '\s*(?=[\{;])'
|
||||||
|
pop: true
|
||||||
|
- match: (url)(\()
|
||||||
|
captures:
|
||||||
|
1: meta.function-call.css support.function.url.css
|
||||||
|
2: punctuation.definition.group.begin.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.group.css
|
||||||
|
- match: '\)'
|
||||||
|
scope: punctuation.definition.group.end.css
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#literal-string
|
||||||
|
- include: Sass.sublime-syntax#unquoted-string
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- include: Sass.sublime-syntax#literal-string
|
||||||
|
- match: '\s*((@)counter-style\b)\s+(?:(?i:\b(decimal|none)\b)|({{ident}}))?\s*(?=\{|$)'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.counter-style.css
|
||||||
|
2: punctuation.definition.keyword.css
|
||||||
|
3: invalid.illegal.counter-style-name.css
|
||||||
|
4: entity.other.counter-style-name.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.counter-style.css
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- match: '(?=\{)'
|
||||||
|
pop: true
|
||||||
|
- match: '(?=\s*@custom-media\b)'
|
||||||
|
push:
|
||||||
|
- match: ;
|
||||||
|
scope: punctuation.terminator.css
|
||||||
|
pop: true
|
||||||
|
- match: \s*((@)custom-media)
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.custom-media.css
|
||||||
|
2: punctuation.definition.keyword.css
|
||||||
|
3: support.constant.custom-media.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.custom-media.css
|
||||||
|
- match: \s*(?=;)
|
||||||
|
pop: true
|
||||||
|
- include: media-query
|
||||||
|
- match: '((@)document)'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.document.css
|
||||||
|
2: punctuation.definition.keyword.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.document.css
|
||||||
|
- match: '(?=[\{;])'
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- include: Sass.sublime-syntax#url-function
|
||||||
|
- include: Sass.sublime-syntax#url-prefix-function
|
||||||
|
- include: Sass.sublime-syntax#domain-function
|
||||||
|
- include: Sass.sublime-syntax#regexp-function
|
||||||
|
- include: Sass.sublime-syntax#comma-delimiter
|
||||||
|
- match: '\s*((@)import\b)\s*'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.import.css
|
||||||
|
2: punctuation.definition.keyword.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.import.css
|
||||||
|
- match: ';'
|
||||||
|
scope: punctuation.terminator.rule.sass
|
||||||
|
pop: true
|
||||||
|
- match: '(\()(reference|inline|less|css|once|multiple|optional)(\))'
|
||||||
|
captures:
|
||||||
|
0: meta.at-rule.arguments.sass
|
||||||
|
1: punctuation.definition.group.begin.sass
|
||||||
|
2: constant.other.sass
|
||||||
|
3: punctuation.definition.group.end.sass
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- include: Sass.sublime-syntax#literal-string
|
||||||
|
- include: Sass.sublime-syntax#url-function
|
||||||
|
- include: media-query
|
||||||
|
- match: '\s*((@)(-webkit-|-moz-|-o-)?keyframes)'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.keyframe.css
|
||||||
|
2: punctuation.definition.keyword.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.keyframe.css
|
||||||
|
- match: '\s*(?=[\{;])'
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- include: Sass.sublime-syntax#sass-interpolation
|
||||||
|
- match: '\s*({{ident}})?'
|
||||||
|
captures:
|
||||||
|
1: entity.other.animation-name.css
|
||||||
|
- match: '\s*(?:(,)|(?=[{;]))'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.arbitrary-repetition.css
|
||||||
|
- match: '\s*((@)media)\b'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.media.css
|
||||||
|
2: punctuation.definition.keyword.css
|
||||||
|
3: support.constant.media.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.media.css
|
||||||
|
- include: media-query
|
||||||
|
- match: '(?=\{)'
|
||||||
|
pop: true
|
||||||
|
- match: '\s*((@)namespace)\s+({{ident}}(?!{{nmchar}}|\())?'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.namespace.css
|
||||||
|
2: punctuation.definition.keyword.css
|
||||||
|
3: entity.other.namespace-prefix.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.namespace.css
|
||||||
|
- include: at-rule-punctuation
|
||||||
|
- include: Sass.sublime-syntax#literal-string
|
||||||
|
- include: Sass.sublime-syntax#url-function
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- match: '\s*((@)page)\s*(?:(:)(first|left|right))?\s*'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.page.css
|
||||||
|
2: punctuation.definition.keyword.css
|
||||||
|
3: punctuation.definition.entity.css
|
||||||
|
4: entity.other.pseudo-class.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.page.css
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- match: '\s*(?=\{)'
|
||||||
|
pop: true
|
||||||
|
- match: '((@)supports)'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.supports.css
|
||||||
|
2: punctuation.definition.keyword.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.supports.css
|
||||||
|
- match: '(?=\{)'
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#at-supports-operators
|
||||||
|
- include: at-supports-parens
|
||||||
|
- match: '((@)content)'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.content.sass
|
||||||
|
2: punctuation.definition.keyword.sass
|
||||||
|
push:
|
||||||
|
- match: ';'
|
||||||
|
scope: punctuation.terminator.rule.sass
|
||||||
|
pop: true
|
||||||
|
- match: '(?=$)'
|
||||||
|
pop: true
|
||||||
|
|
||||||
|
at-supports-parens:
|
||||||
|
- match: '\('
|
||||||
|
scope: punctuation.definition.group.begin.css
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.group.css
|
||||||
|
- match: '\)'
|
||||||
|
scope: punctuation.definition.group.end.css
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#at-supports-operators
|
||||||
|
- include: at-supports-parens
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- include: properties
|
||||||
|
|
||||||
|
at-rule-punctuation:
|
||||||
|
- match: ';'
|
||||||
|
scope: punctuation.terminator.rule.css
|
||||||
|
- match: '(?=;|$)'
|
||||||
|
pop: true
|
||||||
|
|
||||||
|
media-query:
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- match: \b(?i:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)\b
|
||||||
|
scope: support.constant.media.css
|
||||||
|
- match: '\b(?i:and|or|not|only)\b'
|
||||||
|
scope: keyword.operator.logic.media.css
|
||||||
|
- match: ','
|
||||||
|
scope: punctuation.definition.arbitrary-repetition.css
|
||||||
|
- match: \(
|
||||||
|
scope: punctuation.definition.group.begin.css
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
scope: punctuation.definition.group.end.css
|
||||||
|
pop: true
|
||||||
|
- include: Sass.sublime-syntax#comment-block
|
||||||
|
- include: Sass.sublime-syntax#comment-line
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(
|
||||||
|
(-webkit-|-o-)?
|
||||||
|
((min|max)-)?
|
||||||
|
(-moz-)?
|
||||||
|
(
|
||||||
|
((device-)?(height|width|aspect-ratio|pixel-ratio))|
|
||||||
|
(color(-index)?)|monochrome|resolution
|
||||||
|
)
|
||||||
|
)|grid|scan|orientation
|
||||||
|
\s*(?=[:)])
|
||||||
|
captures:
|
||||||
|
0: support.type.property-name.media.css
|
||||||
|
2: support.type.vendor-prefix.css
|
||||||
|
5: support.type.vendor-prefix.css
|
||||||
|
push:
|
||||||
|
- match: (:)|(?=\))
|
||||||
|
captures:
|
||||||
|
1: punctuation.separator.key-value.css
|
||||||
|
pop: true
|
||||||
|
- match: \b(portrait|landscape|progressive|interlace)
|
||||||
|
scope: support.constant.property-value.css
|
||||||
|
- match: \s*(\d+)(/)(\d+)
|
||||||
|
captures:
|
||||||
|
1: constant.numeric.css
|
||||||
|
2: keyword.operator.arithmetic.css
|
||||||
|
3: constant.numeric.css
|
||||||
|
- include: Sass.sublime-syntax#numeric-values
|
||||||
|
- include: Sass.sublime-syntax#sass-value-expression
|
||||||
|
|
||||||
|
|
||||||
|
curly-braces:
|
||||||
|
- match: '\{'
|
||||||
|
scope: punctuation.section.property-list.begin.css
|
||||||
|
- match: '\}'
|
||||||
|
scope: punctuation.section.property-list.end.css
|
File diff suppressed because it is too large
Load Diff
@ -1,157 +0,0 @@
|
|||||||
---
|
|
||||||
title = "Markdown"
|
|
||||||
---
|
|
||||||
|
|
||||||
_mkbook_ nominally utilizes [CommonMark](https://commonmark.org/) with some [GFM](https://github.github.com/gfm/) extensions through the use of the [comrak](https://crates.io/crates/comrak) crate. In using _comrak_, a specific set of options are used, which are listed here:
|
|
||||||
|
|
||||||
```rust
|
|
||||||
let options: ComrakOptions = ComrakOptions {
|
|
||||||
hardbreaks: false,
|
|
||||||
smart: true,
|
|
||||||
github_pre_lang: false,
|
|
||||||
default_info_string: None,
|
|
||||||
unsafe_: true,
|
|
||||||
ext_strikethrough: true,
|
|
||||||
ext_tagfilter: false,
|
|
||||||
ext_table: true,
|
|
||||||
ext_autolink: true,
|
|
||||||
ext_tasklist: true,
|
|
||||||
ext_superscript: true,
|
|
||||||
ext_header_ids: Some("header".to_owned()),
|
|
||||||
ext_footnotes: true,
|
|
||||||
ext_description_lists: true,
|
|
||||||
..ComrakOptions::default()
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
Mostly, know that the following extensions are enabled:
|
|
||||||
|
|
||||||
* [Strikethrough](https://github.github.com/gfm/#strikethrough-extension-)
|
|
||||||
* [Tables](https://github.github.com/gfm/#tables-extension-)
|
|
||||||
* [Autolinks](https://github.github.com/gfm/#autolinks-extension-)
|
|
||||||
* [Task Lists](https://github.github.com/gfm/#task-list-items-extension-)
|
|
||||||
* Superscripts (`e = mc^2^.` → `e = mc<sup>2</sup>.`)
|
|
||||||
* [Footnotes](https://kramdown.gettalong.org/syntax.html#footnotes)
|
|
||||||
* Description Lists:
|
|
||||||
```md
|
|
||||||
First term
|
|
||||||
|
|
||||||
: Details for the **first term**
|
|
||||||
|
|
||||||
Second term
|
|
||||||
|
|
||||||
: Details for the **second term**
|
|
||||||
|
|
||||||
More details in second paragraph.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Syntax Highlight
|
|
||||||
|
|
||||||
GFM syntax highlighting is also available by using fenced code tags with a label denoting the language, as such:
|
|
||||||
|
|
||||||
~~~md
|
|
||||||
```c++
|
|
||||||
#include <stdio>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
std::cout << "Hello, world!" << std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
~~~
|
|
||||||
|
|
||||||
which results in:
|
|
||||||
|
|
||||||
```c++
|
|
||||||
#include <stdio>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
std::cout << "Hello, world!" << std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
To denote the language you can either use one the language's extensions as the label, or the full name of the language (which is **not** case-sensitive).
|
|
||||||
|
|
||||||
The list of supported languages is currently as follows:
|
|
||||||
|
|
||||||
| Language Name | Supported Tags / Extensions |
|
|
||||||
|:-|:-|
|
|
||||||
| ASP | `asa` |
|
|
||||||
| ActionScript | `as` |
|
|
||||||
| AppleScript | `applescript`, `script editor` |
|
|
||||||
| Batch File | `bat`, `cmd` |
|
|
||||||
| BibTeX | `bib` |
|
|
||||||
| Bourne Again Shell (bash) | `sh`, `bash`, `zsh`, `fish`, `.bash_aliases`, `.bash_completions`, `.bash_functions`, `.bash_login`, `.bash_logout`, `.bash_profile`, `.bash_variables`, `.bashrc`, `.profile`, `.textmate_init` |
|
|
||||||
| C | `c`, `h` |
|
|
||||||
| C# | `cs`, `csx` |
|
|
||||||
| C++ | `cpp`, `cc`, `cp`, `cxx`, `c++`, `C`, `h`, `hh`, `hpp`, `hxx`, `h++`, `inl`, `ipp` |
|
|
||||||
| CSS | `css`, `css.erb`, `css.liquid` |
|
|
||||||
| Cargo Build Results | `` |
|
|
||||||
| Clojure | `clj` |
|
|
||||||
| D | `d`, `di` |
|
|
||||||
| Diff | `diff`, `patch` |
|
|
||||||
| Erlang | `erl`, `hrl`, `Emakefile`, `emakefile` |
|
|
||||||
| Go | `go` |
|
|
||||||
| Graphviz (DOT) | `dot`, `DOT`, `gv` |
|
|
||||||
| Groovy | `groovy`, `gvy`, `gradle` |
|
|
||||||
| HTML (ASP) | `asp` |
|
|
||||||
| HTML (Erlang) | `yaws` |
|
|
||||||
| HTML (Rails) | `rails`, `rhtml`, `erb`, `html.erb` |
|
|
||||||
| HTML (Tcl) | `adp` |
|
|
||||||
| HTML | `html`, `htm`, `shtml`, `xhtml`, `inc`, `tmpl`, `tpl` |
|
|
||||||
| Haskell | `hs` |
|
|
||||||
| Haxe | `hx`, `hxsl`, `hscript` |
|
|
||||||
| Hxml | `hxml` |
|
|
||||||
| JSON | `json`, `sublime-settings`, `sublime-menu`, `sublime-keymap`, `sublime-mousemap`, `sublime-theme`, `sublime-build`, `sublime-project`, `sublime-completions`, `sublime-commands`, `sublime-macro`, `sublime-color-scheme` |
|
|
||||||
| Java Properties | `properties` |
|
|
||||||
| Java Server Page (JSP) | `jsp` |
|
|
||||||
| Java | `java`, `bsh` |
|
|
||||||
| JavaDoc | `` |
|
|
||||||
| JavaScript (Rails) | `js.erb` |
|
|
||||||
| JavaScript | `js`, `htc` |
|
|
||||||
| LaTeX Log | `` |
|
|
||||||
| LaTeX | `tex`, `ltx` |
|
|
||||||
| Lisp | `lisp`, `cl`, `clisp`, `l`, `mud`, `el`, `scm`, `ss`, `lsp`, `fasl` |
|
|
||||||
| Literate Haskell | `lhs` |
|
|
||||||
| Lua | `lua` |
|
|
||||||
| MATLAB | `matlab` |
|
|
||||||
| Make Output | `` |
|
|
||||||
| Makefile | `make`, `GNUmakefile`, `makefile`, `Makefile`, `OCamlMakefile`, `mak`, `mk` |
|
|
||||||
| Markdown | `md`, `mdown`, `markdown`, `markdn` |
|
|
||||||
| MultiMarkdown | `` |
|
|
||||||
| NAnt Build File | `build` |
|
|
||||||
| OCaml | `ml`, `mli` |
|
|
||||||
| OCamllex | `mll` |
|
|
||||||
| OCamlyacc | `mly` |
|
|
||||||
| Objective-C | `m`, `h` |
|
|
||||||
| Objective-C++ | `mm`, `M`, `h` |
|
|
||||||
| PHP Source | `` |
|
|
||||||
| PHP | `php`, `php3`, `php4`, `php5`, `php7`, `phps`, `phpt`, `phtml` |
|
|
||||||
| Pascal | `pas`, `p`, `dpr` |
|
|
||||||
| Perl | `pl`, `pm`, `pod`, `t`, `PL` |
|
|
||||||
| Plain Text | `txt` |
|
|
||||||
| Python | `py`, `py3`, `pyw`, `pyi`, `pyx`, `pyx.in`, `pxd`, `pxd.in`, `pxi`, `pxi.in`, `rpy`, `cpy`, `SConstruct`, `Sconstruct`, `sconstruct`, `SConscript`, `gyp`, `gypi`, `Snakefile`, `wscript` |
|
|
||||||
| R Console | `` |
|
|
||||||
| R | `R`, `r`, `s`, `S`, `Rprofile` |
|
|
||||||
| Rd (R Documentation) | `rd` |
|
|
||||||
| Regular Expression | `re` |
|
|
||||||
| Regular Expressions (Javascript) | `` |
|
|
||||||
| Regular Expressions (Python) | `` |
|
|
||||||
| Ruby Haml | `haml`, `sass` |
|
|
||||||
| Ruby on Rails | `rxml`, `builder` |
|
|
||||||
| Ruby | `rb`, `Appfile`, `Appraisals`, `Berksfile`, `Brewfile`, `capfile`, `cgi`, `Cheffile`, `config.ru`, `Deliverfile`, `Fastfile`, `fcgi`, `Gemfile`, `gemspec`, `Guardfile`, `irbrc`, `jbuilder`, `podspec`, `prawn`, `rabl`, `rake`, `Rakefile`, `Rantfile`, `rbx`, `rjs`, `ruby.rail`, `Scanfile`, `simplecov`, `Snapfile`, `thor`, `Thorfile`, `Vagrantfile` |
|
|
||||||
| Rust | `rs` |
|
|
||||||
| SQL (Rails) | `erbsql`, `sql.erb` |
|
|
||||||
| SQL | `sql`, `ddl`, `dml` |
|
|
||||||
| Scala | `scala`, `sbt` |
|
|
||||||
| Shell-Unix-Generic | `` |
|
|
||||||
| TOML | `toml`, `tml`, `Cargo.lock`, `Gopkg.lock`, `Pipfile` |
|
|
||||||
| Tcl | `tcl` |
|
|
||||||
| TeX | `sty`, `cls` |
|
|
||||||
| Textile | `textile` |
|
|
||||||
| XML | `xml`, `xsd`, `xslt`, `tld`, `dtml`, `rss`, `opml`, `svg` |
|
|
||||||
| YAML | `yaml`, `yml`, `sublime-syntax` |
|
|
||||||
| camlp4 | `` |
|
|
||||||
| commands-builtin-shell-bash | `` |
|
|
||||||
| reStructuredText | `rst`, `rest` |
|
|
@ -0,0 +1,46 @@
|
|||||||
|
---
|
||||||
|
title = "Commonmark"
|
||||||
|
---
|
||||||
|
|
||||||
|
_mkbook_ nominally utilizes [CommonMark](https://commonmark.org/) with some [GFM](https://github.github.com/gfm/) extensions through the use of the [comrak](https://crates.io/crates/comrak) crate. In using _comrak_, a specific set of options are used, which are listed here:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
let options: ComrakOptions = ComrakOptions {
|
||||||
|
hardbreaks: false,
|
||||||
|
smart: true,
|
||||||
|
github_pre_lang: false,
|
||||||
|
default_info_string: None,
|
||||||
|
unsafe_: true,
|
||||||
|
ext_strikethrough: true,
|
||||||
|
ext_tagfilter: false,
|
||||||
|
ext_table: true,
|
||||||
|
ext_autolink: true,
|
||||||
|
ext_tasklist: true,
|
||||||
|
ext_superscript: true,
|
||||||
|
ext_header_ids: Some("header".to_owned()),
|
||||||
|
ext_footnotes: true,
|
||||||
|
ext_description_lists: true,
|
||||||
|
..ComrakOptions::default()
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
Mostly, know that the following extensions are enabled:
|
||||||
|
|
||||||
|
* [Strikethrough](https://github.github.com/gfm/#strikethrough-extension-)
|
||||||
|
* [Tables](https://github.github.com/gfm/#tables-extension-)
|
||||||
|
* [Autolinks](https://github.github.com/gfm/#autolinks-extension-)
|
||||||
|
* [Task Lists](https://github.github.com/gfm/#task-list-items-extension-)
|
||||||
|
* Superscripts (`e = mc^2^.` → `e = mc<sup>2</sup>.`)
|
||||||
|
* [Footnotes](https://kramdown.gettalong.org/syntax.html#footnotes)
|
||||||
|
* Description Lists:
|
||||||
|
```md
|
||||||
|
First term
|
||||||
|
|
||||||
|
: Details for the **first term**
|
||||||
|
|
||||||
|
Second term
|
||||||
|
|
||||||
|
: Details for the **second term**
|
||||||
|
|
||||||
|
More details in second paragraph.
|
||||||
|
```
|
@ -0,0 +1,432 @@
|
|||||||
|
---
|
||||||
|
title = "Syntax Highlighting"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Syntax Highlighting
|
||||||
|
|
||||||
|
GFM syntax highlighting is also available by using fenced code tags with a label denoting the language, as such:
|
||||||
|
|
||||||
|
~~~md
|
||||||
|
```c++
|
||||||
|
#include <stdio>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
std::cout << "Hello, world!" << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
~~~
|
||||||
|
|
||||||
|
which results in:
|
||||||
|
|
||||||
|
```c++
|
||||||
|
#include <stdio>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
std::cout << "Hello, world!" << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
To denote the language you can either use one the language's extensions as the label, or the full name of the language (which is **not** case-sensitive).
|
||||||
|
|
||||||
|
The list of supported languages is currently as follows:
|
||||||
|
|
||||||
|
ASP
|
||||||
|
|
||||||
|
: `asa`
|
||||||
|
|
||||||
|
|
||||||
|
ActionScript
|
||||||
|
|
||||||
|
: `as`
|
||||||
|
|
||||||
|
|
||||||
|
AppleScript
|
||||||
|
|
||||||
|
: `applescript`, `script editor`
|
||||||
|
|
||||||
|
|
||||||
|
Batch File
|
||||||
|
|
||||||
|
: `bat`, `cmd`
|
||||||
|
|
||||||
|
|
||||||
|
BibTeX
|
||||||
|
|
||||||
|
: `bib`
|
||||||
|
|
||||||
|
|
||||||
|
Bourne Again Shell (bash)
|
||||||
|
|
||||||
|
: `sh`, `bash`, `zsh`, `fish`, `.bash_aliases`, `.bash_completions`, `.bash_functions`, `.bash_login`, `.bash_logout`, `.bash_profile`, `.bash_variables`, `.bashrc`, `.profile`, `.textmate_init`
|
||||||
|
|
||||||
|
|
||||||
|
C
|
||||||
|
|
||||||
|
: `c`, `h`
|
||||||
|
|
||||||
|
|
||||||
|
C#
|
||||||
|
|
||||||
|
: `cs`, `csx`
|
||||||
|
|
||||||
|
|
||||||
|
C++
|
||||||
|
|
||||||
|
: `cpp`, `cc`, `cp`, `cxx`, `c++`, `C`, `h`, `hh`, `hpp`, `hxx`, `h++`, `inl`, `ipp`
|
||||||
|
|
||||||
|
|
||||||
|
CSS
|
||||||
|
|
||||||
|
: `css`, `css.erb`, `css.liquid`
|
||||||
|
|
||||||
|
|
||||||
|
Cargo Build Results
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
Clojure
|
||||||
|
|
||||||
|
: `clj`
|
||||||
|
|
||||||
|
|
||||||
|
D
|
||||||
|
|
||||||
|
: `d`, `di`
|
||||||
|
|
||||||
|
|
||||||
|
Diff
|
||||||
|
|
||||||
|
: `diff`, `patch`
|
||||||
|
|
||||||
|
|
||||||
|
Erlang
|
||||||
|
|
||||||
|
: `erl`, `hrl`, `Emakefile`, `emakefile`
|
||||||
|
|
||||||
|
|
||||||
|
Go
|
||||||
|
|
||||||
|
: `go`
|
||||||
|
|
||||||
|
|
||||||
|
Graphviz (DOT)
|
||||||
|
|
||||||
|
: `dot`, `DOT`, `gv`
|
||||||
|
|
||||||
|
|
||||||
|
Groovy
|
||||||
|
|
||||||
|
: `groovy`, `gvy`, `gradle`
|
||||||
|
|
||||||
|
|
||||||
|
HTML
|
||||||
|
|
||||||
|
: `html`, `htm`, `shtml`, `xhtml`, `inc`, `tmpl`, `tpl`
|
||||||
|
|
||||||
|
|
||||||
|
HTML (ASP)
|
||||||
|
|
||||||
|
: `asp`
|
||||||
|
|
||||||
|
|
||||||
|
HTML (Erlang)
|
||||||
|
|
||||||
|
: `yaws`
|
||||||
|
|
||||||
|
|
||||||
|
HTML (Rails)
|
||||||
|
|
||||||
|
: `rails`, `rhtml`, `erb`, `html.erb`
|
||||||
|
|
||||||
|
|
||||||
|
HTML (Tcl)
|
||||||
|
|
||||||
|
: `adp`
|
||||||
|
|
||||||
|
|
||||||
|
Haskell
|
||||||
|
|
||||||
|
: `hs`
|
||||||
|
|
||||||
|
|
||||||
|
Haxe
|
||||||
|
|
||||||
|
: `hx`, `hxsl`, `hscript`
|
||||||
|
|
||||||
|
|
||||||
|
Hxml
|
||||||
|
|
||||||
|
: `hxml`
|
||||||
|
|
||||||
|
|
||||||
|
JSON
|
||||||
|
|
||||||
|
: `json`, `sublime-settings`, `sublime-menu`, `sublime-keymap`, `sublime-mousemap`, `sublime-theme`, `sublime-build`, `sublime-project`, `sublime-completions`, `sublime-commands`, `sublime-macro`, `sublime-color-scheme`
|
||||||
|
|
||||||
|
|
||||||
|
Java
|
||||||
|
|
||||||
|
: `java`, `bsh`
|
||||||
|
|
||||||
|
|
||||||
|
Java Properties
|
||||||
|
|
||||||
|
: `properties`
|
||||||
|
|
||||||
|
|
||||||
|
Java Server Page (JSP)
|
||||||
|
|
||||||
|
: `jsp`
|
||||||
|
|
||||||
|
|
||||||
|
JavaDoc
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
JavaScript
|
||||||
|
|
||||||
|
: `js`, `htc`
|
||||||
|
|
||||||
|
|
||||||
|
JavaScript (Rails)
|
||||||
|
|
||||||
|
: `js.erb`
|
||||||
|
|
||||||
|
|
||||||
|
LaTeX
|
||||||
|
|
||||||
|
: `tex`, `ltx`
|
||||||
|
|
||||||
|
|
||||||
|
LaTeX Log
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
Lisp
|
||||||
|
|
||||||
|
: `lisp`, `cl`, `clisp`, `l`, `mud`, `el`, `scm`, `ss`, `lsp`, `fasl`
|
||||||
|
|
||||||
|
|
||||||
|
Literate Haskell
|
||||||
|
|
||||||
|
: `lhs`
|
||||||
|
|
||||||
|
|
||||||
|
Lua
|
||||||
|
|
||||||
|
: `lua`
|
||||||
|
|
||||||
|
|
||||||
|
MATLAB
|
||||||
|
|
||||||
|
: `matlab`
|
||||||
|
|
||||||
|
|
||||||
|
Make Output
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
Makefile
|
||||||
|
|
||||||
|
: `make`, `GNUmakefile`, `makefile`, `Makefile`, `OCamlMakefile`, `mak`, `mk`
|
||||||
|
|
||||||
|
|
||||||
|
Markdown
|
||||||
|
|
||||||
|
: `md`, `mdown`, `markdown`, `markdn`
|
||||||
|
|
||||||
|
|
||||||
|
MultiMarkdown
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
NAnt Build File
|
||||||
|
|
||||||
|
: `build`
|
||||||
|
|
||||||
|
|
||||||
|
OCaml
|
||||||
|
|
||||||
|
: `ml`, `mli`
|
||||||
|
|
||||||
|
|
||||||
|
OCamllex
|
||||||
|
|
||||||
|
: `mll`
|
||||||
|
|
||||||
|
|
||||||
|
OCamlyacc
|
||||||
|
|
||||||
|
: `mly`
|
||||||
|
|
||||||
|
|
||||||
|
Objective-C
|
||||||
|
|
||||||
|
: `m`, `h`
|
||||||
|
|
||||||
|
|
||||||
|
Objective-C++
|
||||||
|
|
||||||
|
: `mm`, `M`, `h`
|
||||||
|
|
||||||
|
|
||||||
|
PHP
|
||||||
|
|
||||||
|
: `php`, `php3`, `php4`, `php5`, `php7`, `phps`, `phpt`, `phtml`
|
||||||
|
|
||||||
|
|
||||||
|
PHP Source
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
Pascal
|
||||||
|
|
||||||
|
: `pas`, `p`, `dpr`
|
||||||
|
|
||||||
|
|
||||||
|
Perl
|
||||||
|
|
||||||
|
: `pl`, `pm`, `pod`, `t`, `PL`
|
||||||
|
|
||||||
|
|
||||||
|
Plain Text
|
||||||
|
|
||||||
|
: `txt`
|
||||||
|
|
||||||
|
|
||||||
|
Python
|
||||||
|
|
||||||
|
: `py`, `py3`, `pyw`, `pyi`, `pyx`, `pyx.in`, `pxd`, `pxd.in`, `pxi`, `pxi.in`, `rpy`, `cpy`, `SConstruct`, `Sconstruct`, `sconstruct`, `SConscript`, `gyp`, `gypi`, `Snakefile`, `wscript`
|
||||||
|
|
||||||
|
|
||||||
|
R
|
||||||
|
|
||||||
|
: `R`, `r`, `s`, `S`, `Rprofile`
|
||||||
|
|
||||||
|
|
||||||
|
R Console
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
Rd (R Documentation)
|
||||||
|
|
||||||
|
: `rd`
|
||||||
|
|
||||||
|
|
||||||
|
Regular Expression
|
||||||
|
|
||||||
|
: `re`
|
||||||
|
|
||||||
|
|
||||||
|
Regular Expressions (Javascript)
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
Regular Expressions (Python)
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
Ruby
|
||||||
|
|
||||||
|
: `rb`, `Appfile`, `Appraisals`, `Berksfile`, `Brewfile`, `capfile`, `cgi`, `Cheffile`, `config.ru`, `Deliverfile`, `Fastfile`, `fcgi`, `Gemfile`, `gemspec`, `Guardfile`, `irbrc`, `jbuilder`, `podspec`, `prawn`, `rabl`, `rake`, `Rakefile`, `Rantfile`, `rbx`, `rjs`, `ruby.rail`, `Scanfile`, `simplecov`, `Snapfile`, `thor`, `Thorfile`, `Vagrantfile`
|
||||||
|
|
||||||
|
|
||||||
|
Ruby Haml
|
||||||
|
|
||||||
|
: `haml`, `sass`
|
||||||
|
|
||||||
|
|
||||||
|
Ruby on Rails
|
||||||
|
|
||||||
|
: `rxml`, `builder`
|
||||||
|
|
||||||
|
|
||||||
|
Rust
|
||||||
|
|
||||||
|
: `rs`
|
||||||
|
|
||||||
|
|
||||||
|
SCSS
|
||||||
|
|
||||||
|
: `scss`
|
||||||
|
|
||||||
|
|
||||||
|
SQL
|
||||||
|
|
||||||
|
: `sql`, `ddl`, `dml`
|
||||||
|
|
||||||
|
|
||||||
|
SQL (Rails)
|
||||||
|
|
||||||
|
: `erbsql`, `sql.erb`
|
||||||
|
|
||||||
|
|
||||||
|
Sass
|
||||||
|
|
||||||
|
: `sass`
|
||||||
|
|
||||||
|
|
||||||
|
Scala
|
||||||
|
|
||||||
|
: `scala`, `sbt`
|
||||||
|
|
||||||
|
|
||||||
|
Shell-Unix-Generic
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
TOML
|
||||||
|
|
||||||
|
: `toml`, `tml`, `Cargo.lock`, `Gopkg.lock`, `Pipfile`
|
||||||
|
|
||||||
|
|
||||||
|
Tcl
|
||||||
|
|
||||||
|
: `tcl`
|
||||||
|
|
||||||
|
|
||||||
|
TeX
|
||||||
|
|
||||||
|
: `sty`, `cls`
|
||||||
|
|
||||||
|
|
||||||
|
Textile
|
||||||
|
|
||||||
|
: `textile`
|
||||||
|
|
||||||
|
|
||||||
|
XML
|
||||||
|
|
||||||
|
: `xml`, `xsd`, `xslt`, `tld`, `dtml`, `rss`, `opml`, `svg`
|
||||||
|
|
||||||
|
|
||||||
|
YAML
|
||||||
|
|
||||||
|
: `yaml`, `yml`, `sublime-syntax`
|
||||||
|
|
||||||
|
|
||||||
|
camlp4
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
commands-builtin-shell-bash
|
||||||
|
|
||||||
|
: ``
|
||||||
|
|
||||||
|
|
||||||
|
reStructuredText
|
||||||
|
|
||||||
|
: `rst`, `rest`
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
title = "Markdown"
|
||||||
|
---
|
||||||
|
|
||||||
|
_mkbook_ relies pretty extensively on [Markdown](https://daringfireball.net/projects/markdown/) for its ease of use.
|
@ -0,0 +1,164 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>The mkbook Book | Commonmark</title>
|
||||||
|
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
|
||||||
|
<link rel="shortcut icon" href="../favicon.ico" />
|
||||||
|
<meta property="og:title" content="The mkbook Book" />
|
||||||
|
<meta property="og:site_name" content="The mkbook Book" />
|
||||||
|
<meta property="og:type" content="book" />
|
||||||
|
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/01-commonmark.html" />
|
||||||
|
<meta property="og:description" content="<p><em>mkbook</em> is my simpler alternative to <a href="https://crates.io/crates/mdbook">mdbook</a> which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.</p>
|
||||||
|
<p>This tool aims to work somewhat similarly to <em>mdbook</em>, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.</p>
|
||||||
|
" />
|
||||||
|
<meta property="book:author" content="Kenton Hamaluik" />
|
||||||
|
<meta property="book:release_date" content="2019-11-29T21:20:04.527238643+00:00" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="big">
|
||||||
|
<header>
|
||||||
|
<h1><a href="../index.html">The mkbook Book</a></h1>
|
||||||
|
<h2>by Kenton Hamaluik</h2>
|
||||||
|
</header>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../01-introduction/index.html">Introduction</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../02-markdown/index.html">Markdown</a>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<li><a href="../02-markdown/01-commonmark.html" class = "current">Commonmark</a></li>
|
||||||
|
|
||||||
|
<li><a href="../02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
|
||||||
|
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../03-frontmatter/index.html">Front Matter</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../04-structure/index.html">Structure</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../05-customization/index.html">Customization</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../06-how-it-works/index.html">How it Works</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
<nav class="small">
|
||||||
|
<span>
|
||||||
|
<a href="../index.html" alt="Table of Contents">
|
||||||
|
<span class="icon">
|
||||||
|
<svg class="icon-list-ol">
|
||||||
|
<use xlink:href="../icons.svg#icon-list-ol">
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../02-markdown/index.html" alt="Markdown">
|
||||||
|
<span class="icon">
|
||||||
|
|
||||||
|
<svg class="icon-arrow-left">
|
||||||
|
<use xlink:href="../icons.svg#icon-arrow-left">
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<span class="title">Commonmark</span>
|
||||||
|
<span>
|
||||||
|
<span class="placeholder"></span>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../02-markdown/02-syntax-highlighting.html" alt="Syntax Highlighting">
|
||||||
|
<span class="icon">
|
||||||
|
<svg class="icon-arrow-right">
|
||||||
|
<use xlink:href="../icons.svg#icon-arrow-right">
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</nav>
|
||||||
|
<article>
|
||||||
|
<p><em>mkbook</em> nominally utilizes <a href="https://commonmark.org/">CommonMark</a> with some <a href="https://github.github.com/gfm/">GFM</a> extensions through the use of the <a href="https://crates.io/crates/comrak">comrak</a> crate. In using <em>comrak</em>, a specific set of options are used, which are listed here:</p>
|
||||||
|
<pre style="background-color:#2d2d2d;">
|
||||||
|
<span style="color:#cc99cc;">let</span><span style="color:#d3d0c8;"> options: ComrakOptions = ComrakOptions {
|
||||||
|
</span><span style="color:#d3d0c8;"> hardbreaks: </span><span style="color:#f99157;">false</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> smart: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> github_pre_lang: </span><span style="color:#f99157;">false</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> default_info_string: None,
|
||||||
|
</span><span style="color:#d3d0c8;"> unsafe_: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> ext_strikethrough: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> ext_tagfilter: </span><span style="color:#f99157;">false</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> ext_table: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> ext_autolink: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> ext_tasklist: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> ext_superscript: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> ext_header_ids: Some("</span><span style="color:#99cc99;">header</span><span style="color:#d3d0c8;">".</span><span style="color:#66cccc;">to_owned</span><span style="color:#d3d0c8;">()),
|
||||||
|
</span><span style="color:#d3d0c8;"> ext_footnotes: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> ext_description_lists: </span><span style="color:#f99157;">true</span><span style="color:#d3d0c8;">,
|
||||||
|
</span><span style="color:#d3d0c8;"> ..ComrakOptions::default()
|
||||||
|
</span><span style="color:#d3d0c8;">};
|
||||||
|
</span></pre>
|
||||||
|
<p>Mostly, know that the following extensions are enabled:</p>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://github.github.com/gfm/#strikethrough-extension-">Strikethrough</a></li>
|
||||||
|
<li><a href="https://github.github.com/gfm/#tables-extension-">Tables</a></li>
|
||||||
|
<li><a href="https://github.github.com/gfm/#autolinks-extension-">Autolinks</a></li>
|
||||||
|
<li><a href="https://github.github.com/gfm/#task-list-items-extension-">Task Lists</a></li>
|
||||||
|
<li>Superscripts (<code>e = mc^2^.</code> → <code>e = mc<sup>2</sup>.</code>)</li>
|
||||||
|
<li><a href="https://kramdown.gettalong.org/syntax.html#footnotes">Footnotes</a></li>
|
||||||
|
<li>Description Lists:
|
||||||
|
<pre style="background-color:#2d2d2d;">
|
||||||
|
<span style="color:#d3d0c8;">First term
|
||||||
|
</span><span style="color:#d3d0c8;">
|
||||||
|
</span><span style="color:#d3d0c8;">: Details for the </span><span style="font-weight:bold;color:#ffcc66;">**first term**
|
||||||
|
</span><span style="color:#d3d0c8;">
|
||||||
|
</span><span style="color:#d3d0c8;">Second term
|
||||||
|
</span><span style="color:#d3d0c8;">
|
||||||
|
</span><span style="color:#d3d0c8;">: Details for the </span><span style="font-weight:bold;color:#ffcc66;">**second term**
|
||||||
|
</span><span style="color:#d3d0c8;">
|
||||||
|
</span><span style="color:#d3d0c8;"> More details in second paragraph.
|
||||||
|
</span></pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="next-chapter">
|
||||||
|
<a href="../02-markdown/02-syntax-highlighting.html">
|
||||||
|
<span>Next chapter: “Syntax Highlighting”</span>
|
||||||
|
<span class="icon">
|
||||||
|
<svg class="icon-arrow-right">
|
||||||
|
<use xlink:href="../icons.svg#icon-arrow-right">
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer><p>© 2019 Kenton Hamaluik</p></footer>
|
||||||
|
</article>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,123 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>The mkbook Book | Markdown</title>
|
||||||
|
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
|
||||||
|
<link rel="shortcut icon" href="../favicon.ico" />
|
||||||
|
<meta property="og:title" content="The mkbook Book" />
|
||||||
|
<meta property="og:site_name" content="The mkbook Book" />
|
||||||
|
<meta property="og:type" content="book" />
|
||||||
|
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/index.html" />
|
||||||
|
<meta property="og:description" content="<p><em>mkbook</em> is my simpler alternative to <a href="https://crates.io/crates/mdbook">mdbook</a> which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.</p>
|
||||||
|
<p>This tool aims to work somewhat similarly to <em>mdbook</em>, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.</p>
|
||||||
|
" />
|
||||||
|
<meta property="book:author" content="Kenton Hamaluik" />
|
||||||
|
<meta property="book:release_date" content="2019-11-29T21:20:04.527238643+00:00" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="big">
|
||||||
|
<header>
|
||||||
|
<h1><a href="../index.html">The mkbook Book</a></h1>
|
||||||
|
<h2>by Kenton Hamaluik</h2>
|
||||||
|
</header>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../01-introduction/index.html">Introduction</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../02-markdown/index.html" class = "current">Markdown</a>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<li><a href="../02-markdown/01-commonmark.html">Commonmark</a></li>
|
||||||
|
|
||||||
|
<li><a href="../02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
|
||||||
|
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../03-frontmatter/index.html">Front Matter</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../04-structure/index.html">Structure</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../05-customization/index.html">Customization</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="../06-how-it-works/index.html">How it Works</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
<nav class="small">
|
||||||
|
<span>
|
||||||
|
<a href="../index.html" alt="Table of Contents">
|
||||||
|
<span class="icon">
|
||||||
|
<svg class="icon-list-ol">
|
||||||
|
<use xlink:href="../icons.svg#icon-list-ol">
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../01-introduction/index.html" alt="Introduction">
|
||||||
|
<span class="icon">
|
||||||
|
|
||||||
|
<svg class="icon-arrow-up">
|
||||||
|
<use xlink:href="../icons.svg#icon-arrow-up">
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<span class="title">Markdown</span>
|
||||||
|
<span>
|
||||||
|
<span class="placeholder"></span>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../02-markdown/01-commonmark.html" alt="Commonmark">
|
||||||
|
<span class="icon">
|
||||||
|
<svg class="icon-arrow-right">
|
||||||
|
<use xlink:href="../icons.svg#icon-arrow-right">
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</nav>
|
||||||
|
<article>
|
||||||
|
<p><em>mkbook</em> relies pretty extensively on <a href="https://daringfireball.net/projects/markdown/">Markdown</a> for its ease of use.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="next-chapter">
|
||||||
|
<a href="../02-markdown/01-commonmark.html">
|
||||||
|
<span>Next chapter: “Commonmark”</span>
|
||||||
|
<span class="icon">
|
||||||
|
<svg class="icon-arrow-right">
|
||||||
|
<use xlink:href="../icons.svg#icon-arrow-right">
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer><p>© 2019 Kenton Hamaluik</p></footer>
|
||||||
|
</article>
|
||||||
|
</body>
|
||||||
|
</html>
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.6 KiB |
File diff suppressed because one or more lines are too long
@ -1,4 +1,11 @@
|
|||||||
|
use std::path::PathBuf;
|
||||||
|
use super::frontmatter::FrontMatter;
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Chapter {
|
pub struct Chapter {
|
||||||
pub url: String,
|
pub url: String,
|
||||||
pub title: String,
|
pub front: FrontMatter,
|
||||||
|
pub sections: Vec<Chapter>,
|
||||||
|
pub source: PathBuf,
|
||||||
|
pub contents: String,
|
||||||
}
|
}
|
||||||
|
@ -1,101 +1,114 @@
|
|||||||
body.toc {
|
body.toc {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
> * {
|
||||||
|
width: 36rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
margin-top: 1rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
>* {
|
h1 {
|
||||||
width: 36em;
|
font-size: 3rem;
|
||||||
|
font-weight: 700;
|
||||||
|
font-family: $font-sansserif;
|
||||||
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
h2 {
|
||||||
margin-top: 1em;
|
font-size: 1rem;
|
||||||
display: flex;
|
font-weight: 600;
|
||||||
flex-direction: column;
|
font-family: $font-sansserif;
|
||||||
align-items: center;
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
h1 {
|
|
||||||
font-size: 3em;
|
|
||||||
font-weight: 700;
|
|
||||||
font-family: $font-sansserif;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: 1em;
|
|
||||||
font-weight: 600;
|
|
||||||
font-family: $font-sansserif;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
time {
|
time {
|
||||||
font-size: 1em;
|
font-size: 1rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-family: $font-serif;
|
font-family: $font-serif;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
background: none;
|
background: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 2.5em;
|
font-size: 2.5rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol {
|
||||||
|
li {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-family: $font-sansserif;
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
margin: 0 0 0.25em 0;
|
||||||
|
color: #5babd1;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #cf5ccd;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ol {
|
ol {
|
||||||
margin: 0.25em 0 0;
|
li {
|
||||||
li {
|
font-size: 1.25rem;
|
||||||
font-size: 1.5em;
|
}
|
||||||
font-family: $font-sansserif;
|
|
||||||
|
|
||||||
a {
|
|
||||||
text-decoration: none;
|
|
||||||
margin: 0 0 0.25em 0;
|
|
||||||
color: #5babd1;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: #cf5ccd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> ol {
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
margin-right: 0.5rem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
footer {
|
article,
|
||||||
flex: 1;
|
nav {
|
||||||
|
padding: 0;
|
||||||
|
> * {
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
margin-right: 0.5rem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
body.toc {
|
body.toc {
|
||||||
>* {
|
> * {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
|
||||||
h1, h2, time {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
article, nav {
|
header {
|
||||||
padding: 0;
|
h1,
|
||||||
>* {
|
h2,
|
||||||
margin-left: 0.5em;
|
time {
|
||||||
margin-right: 0.5em;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 1.75em;
|
font-size: 1.75rem;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue