1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-27 17:00:54 +01:00

Fixed code blocks after Markdown 3.2 release

This commit is contained in:
squidfunk 2020-02-08 10:16:59 +01:00
parent bc275711de
commit 92bfb148ed
14 changed files with 66 additions and 107 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(o){o.multiLanguage=function(){for(var e=Array.prototype.slice.call(arguments),i=e.join("-"),t="",r=[],n=[],s=0;s<e.length;++s)"en"==e[s]?(t+="\\w",r.unshift(o.stopWordFilter),r.push(o.stemmer),n.push(o.stemmer)):(t+=o[e[s]].wordCharacters,r.unshift(o[e[s]].stopWordFilter),r.push(o[e[s]].stemmer),n.push(o[e[s]].stemmer));var p=o.trimmerSupport.generateTrimmer(t);return o.Pipeline.registerFunction(p,"lunr-multi-trimmer-"+i),r.unshift(p),function(){this.pipeline.reset(),this.pipeline.add.apply(this.pipeline,r),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add.apply(this.searchPipeline,n))}}}});
!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(e.lunr)}(this,function(){return function(o){o.multiLanguage=function(){for(var e=Array.prototype.slice.call(arguments),t=e.join("-"),i="",r=[],n=[],s=0;s<e.length;++s)"en"==e[s]?(i+="\\w",r.unshift(o.stopWordFilter),r.push(o.stemmer),n.push(o.stemmer)):(i+=o[e[s]].wordCharacters,o[e[s]].stopWordFilter&&r.unshift(o[e[s]].stopWordFilter),o[e[s]].stemmer&&(r.push(o[e[s]].stemmer),n.push(o[e[s]].stemmer)));var p=o.trimmerSupport.generateTrimmer(i);return o.Pipeline.registerFunction(p,"lunr-multi-trimmer-"+t),r.unshift(p),function(){this.pipeline.reset(),this.pipeline.add.apply(this.pipeline,r),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add.apply(this.searchPipeline,n))}}}});

View File

@ -0,0 +1,17 @@
/*!
* Lunr languages, `Vietnamese` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2017, Keerati Thiwanruk
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.vi=function(){this.pipeline.reset(),this.pipeline.add(e.vi.stopWordFilter,e.vi.trimmer)},e.vi.wordCharacters="[A-Za-ẓ̀͐́͑̉̃̓ÂâÊêÔôĂ-ăĐ-đƠ-ơƯ-ư]",e.vi.trimmer=e.trimmerSupport.generateTrimmer(e.vi.wordCharacters),e.Pipeline.registerFunction(e.vi.trimmer,"trimmer-vi"),e.vi.stopWordFilter=e.generateStopWordFilter("là cái nhưng mà".split(" "))}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -56,9 +56,9 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/application.e194128b.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/application.592ad16c.css' | url }}">
{% if palette.primary or palette.accent %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/application-palette.3e3d1dff.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/application-palette.a8b3c06d.css' | url }}">
{% endif %}
{% if palette.primary %}
{% import "partials/palette.html" as map %}
@ -69,7 +69,7 @@
{% endif %}
{% endblock %}
{% block libs %}
<script src="{{ 'assets/javascripts/modernizr.74668098.js' | url }}"></script>
<script src="{{ 'assets/javascripts/modernizr.268332fc.js' | url }}"></script>
{% endblock %}
{% block fonts %}
{% if font != false %}
@ -209,7 +209,7 @@
{% endblock %}
</div>
{% block scripts %}
<script src="{{ 'assets/javascripts/application.970603a6.js' | url }}"></script>
<script src="{{ 'assets/javascripts/application.7a53717d.js' | url }}"></script>
{% if lang.t("search.language") != "en" %}
{% set languages = lang.t("search.language").split(",") %}
{% if languages | length and languages[0] != "" %}
@ -220,7 +220,7 @@
{% if language == "ja" %}
<script src="{{ (path ~ 'tinyseg.js') | url }}"></script>
{% endif %}
{% if language in ("da", "de", "es", "fi", "fr", "hu", "it", "ja", "nl", "no", "pt", "ro", "ru", "sv", "th", "tr") %}
{% if language in ("ar", "da", "de", "es", "fi", "fr", "hu", "it", "ja", "nl", "no", "pt", "ro", "ru", "sv", "th", "tr", "vi") %}
<script src="{{ (path ~ 'lunr.' ~ language ~ '.js') | url }}"></script>
{% endif %}
{% endif %}

4
package-lock.json generated
View File

@ -5152,7 +5152,7 @@
},
"css-color-names": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
"resolved": "http://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
"integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=",
"dev": true
},
@ -12818,7 +12818,7 @@
},
"rgba-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz",
"resolved": "http://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz",
"integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=",
"dev": true
},

View File

@ -19,8 +19,8 @@
# IN THE SOFTWARE.
# Direct dependencies
mkdocs>=1
mkdocs>=1.0
mkdocs-minify-plugin>=0.2
Pygments>=2.2
markdown<3.2
pymdown-extensions>=6.2,<6.3
markdown>=3.2
pymdown-extensions>=6.3

View File

@ -206,6 +206,13 @@ $codehilite-whitespace: transparent;
}
}
// When pymdownx.superfences is enabled but codehilite is disabled,
// pymdownx.highlight will be used. When this happens, the outer
// container and tables get this class names by default.
.highlight {
@extend .codehilite;
}
// ----------------------------------------------------------------------------
// Rules: layout
// ----------------------------------------------------------------------------
@ -213,58 +220,6 @@ $codehilite-whitespace: transparent;
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// If code blocks are wrapped with codehilite, the styles must be adjusted
// so the marker stretches to the whole width and the padding is respected
.codehilite {
position: relative;
margin: 1em 0;
padding: 0;
border-radius: px2rem(2px);
background-color: $md-code-background;
color: $md-code-color;
line-height: 1.4;
-webkit-overflow-scrolling: touch;
// Actual container with code, overflowing
pre,
code {
display: block;
margin: 0;
padding: px2rem(10.5px) px2rem(12px);
background-color: transparent;
overflow: auto;
vertical-align: top;
// Override native scrollbar styles
&::-webkit-scrollbar {
width: px2rem(4px);
height: px2rem(4px);
}
// Style scrollbar thumb
&::-webkit-scrollbar-thumb {
background-color: $md-color-black--lighter;
// Hovered scrollbar thumb
&:hover {
background-color: $md-color-accent;
}
}
}
}
// If not using Pygments, code will be under pre > code
pre.codehilite {
overflow: visible;
// Actual container with code, overflowing
code {
display: block;
padding: px2rem(10.5px) px2rem(12px);
overflow: auto;
}
}
// Block with line numbers
.codehilitetable {
display: block;
@ -289,7 +244,7 @@ $codehilite-whitespace: transparent;
// The pre tags are nested inside a table, so we need to remove the
// margin because it collapses below all the overflows
.codehilite,
pre,
.linenodiv {
margin: 0;
border-radius: 0;
@ -309,8 +264,6 @@ $codehilite-whitespace: transparent;
// Reset spacings
pre {
margin: 0;
padding: 0;
background-color: transparent;
color: inherit;
text-align: right;
@ -325,25 +278,8 @@ $codehilite-whitespace: transparent;
}
}
// Full-width container
> .codehilite {
// [mobile -]: Stretch to whole width
@include break-to-device(mobile) {
margin: 1em px2rem(-16px);
border-radius: 0;
// Actual container with code, overflowing
pre,
code {
padding: px2rem(10.5px) px2rem(16px);
}
}
}
// Full-width container on top-level
> .codehilitetable {
box-shadow: none;
// [mobile -]: Stretch to whole width
@include break-to-device(mobile) {
@ -351,23 +287,9 @@ $codehilite-whitespace: transparent;
border-radius: 0;
// Increase spacing
.codehilite > pre,
.codehilite > code,
.linenodiv {
padding: px2rem(10px) px2rem(16px);
}
}
}
// When pymdownx.superfences is enabled but codehilite is disabled,
// pymdownx.highlight will be used. When this happens, the outer
// container and tables get this class names by default.
.highlight {
@extend .codehilite;
}
// Same as above, but for code blocks with line numbers enabled
.highlighttable {
@extend .codehilitetable;
}
}