aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-10-26 04:59:33 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-10-26 04:59:33 +0300
commitf1c59b2fc7655c4d7a476d1c9c8d35916eac83bd (patch)
tree2d1bc912df87ae1e791da27e4d24de530e6efdaa
parentadd serve.sh (same as serve.bat) (diff)
downloadjekyll-theme-f1c59b2fc7655c4d7a476d1c9c8d35916eac83bd.tar.gz
jekyll-theme-f1c59b2fc7655c4d7a476d1c9c8d35916eac83bd.zip
disable syntax highlighting
-rw-r--r--README.md4
-rw-r--r--_config.yml9
-rw-r--r--_posts/2015-07-03-std-call-once-bug-in-visual-studio-2012-2013.md22
-rw-r--r--css/syntax.css61
4 files changed, 19 insertions, 77 deletions
diff --git a/README.md b/README.md
index d400983..9424fee 100644
--- a/README.md
+++ b/README.md
@@ -74,8 +74,4 @@ See [LICENSE.txt] for details.
This website is build upon the Twitter Bootstrap framework, which is also MIT
Licensed and copyright 2015 Twitter.
-A MIT Licensed CSS style sheet from
-https://github.com/mojombo/tpw/blob/master/css/syntax.css created by Tom
-Preston-Werner is used for syntax highlighting.
-
[LICENSE.txt]: LICENSE.txt
diff --git a/_config.yml b/_config.yml
index f5ab9d6..f2e4296 100644
--- a/_config.yml
+++ b/_config.yml
@@ -7,6 +7,7 @@ exclude:
- Gemfile.lock
- LICENSE.txt
- serve.bat
+ - serve.sh
- README.md
paginate: 10
@@ -15,6 +16,14 @@ excerpt_separator: ""
include_comments: true
minified_externals: true
+highlighter: none
+
+markdown: kramdown
+
+kramdown:
+ syntax_highlighter_opts:
+ disable: true
+
bootstrap_version: 3.3.6
jquery_version: 1.11.3
html5shiv_version: 3.7.2
diff --git a/_posts/2015-07-03-std-call-once-bug-in-visual-studio-2012-2013.md b/_posts/2015-07-03-std-call-once-bug-in-visual-studio-2012-2013.md
index 5570979..19f6224 100644
--- a/_posts/2015-07-03-std-call-once-bug-in-visual-studio-2012-2013.md
+++ b/_posts/2015-07-03-std-call-once-bug-in-visual-studio-2012-2013.md
@@ -4,8 +4,6 @@ layout: post
excerpt: >
In this post, I will describe a neat bug I've stumbled upon in C++ Standard
Library implementation shipped with Microsoft Visual Studio 2012/2013.
-custom_css:
- - syntax.css
---
### Abstract
@@ -46,7 +44,7 @@ C++11 and singletons
Anyway, the story begins with me trying to implement the singleton pattern
using C++11 facilities like this:
-{% highlight c++ %}
+```
#include <mutex>
template <typename DerivedT>
@@ -83,13 +81,13 @@ private:
template <typename DerivedT>
std::once_flag Singleton<DerivedT>::initialized_flag;
-{% endhighlight %}
+```
Neat, huh?
Now other classes can inherit from `Singleton`, implementing the singleton
pattern effortlessly:
-{% highlight c++ %}
+```
class Logger : public Singleton<Logger>
{
private:
@@ -98,7 +96,7 @@ private:
friend class Singleton<Logger>;
};
-{% endhighlight %}
+```
Note that the [N2660] standard proposal isn't/wasn't implemented in the
compilers shipped with Visual Studio 2012/2013.
@@ -106,7 +104,7 @@ If it was, I wouldn't, of course, need to employ this `std::call_once`
trickery, and the implementation would be much simpler, i.e. something like
this:
-{% highlight c++ %}
+```
class Logger
{
public:
@@ -120,7 +118,7 @@ private:
Logger() = default;
~Logger() = default;
};
-{% endhighlight %}
+```
<div class="alert alert-info">
<p>The point is that the <code>Logger::get_instance</code> routine above wasn't
@@ -156,7 +154,7 @@ logging to be done.
OK, I thought, I will simply call `Logger::get_instance` inside `Duke`s
constructor, and everything would be fine.
-{% highlight c++ %}
+```
#include <chrono>
#include <thread>
@@ -195,13 +193,13 @@ private:
friend class Singleton<Duke>;
};
-{% endhighlight %}
+```
What would happen if I had two threads, one to do something with the `Duke`
instance, and the other to do something else, logging in process?
Like this:
-{% highlight c++ %}
+```
#include <ctime>
#include <iostream>
@@ -249,7 +247,7 @@ int main()
t2.join();
return 0;
}
-{% endhighlight %}
+```
The first thread is supposed to have to total running time of about 13 seconds,
right?
diff --git a/css/syntax.css b/css/syntax.css
deleted file mode 100644
index dc60655..0000000
--- a/css/syntax.css
+++ /dev/null
@@ -1,61 +0,0 @@
-.hll { background-color: #ffffcc }
-.c { color: #999988; font-style: italic } /* Comment */
-.err { color: #a61717; background-color: #e3d2d2 } /* Error */
-.k { color: #000000; font-weight: bold } /* Keyword */
-.o { color: #000000; font-weight: bold } /* Operator */
-.cm { color: #999988; font-style: italic } /* Comment.Multiline */
-.cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
-.c1 { color: #999988; font-style: italic } /* Comment.Single */
-.cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
-.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
-.ge { color: #000000; font-style: italic } /* Generic.Emph */
-.gr { color: #aa0000 } /* Generic.Error */
-.gh { color: #999999 } /* Generic.Heading */
-.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
-.go { color: #888888 } /* Generic.Output */
-.gp { color: #555555 } /* Generic.Prompt */
-.gs { font-weight: bold } /* Generic.Strong */
-.gu { color: #aaaaaa } /* Generic.Subheading */
-.gt { color: #aa0000 } /* Generic.Traceback */
-.kc { color: #000000; font-weight: bold } /* Keyword.Constant */
-.kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
-.kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
-.kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
-.kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
-.kt { color: #445588; font-weight: bold } /* Keyword.Type */
-.m { color: #009999 } /* Literal.Number */
-.s { color: #d01040 } /* Literal.String */
-.na { color: #008080 } /* Name.Attribute */
-.nb { color: #0086B3 } /* Name.Builtin */
-.nc { color: #445588; font-weight: bold } /* Name.Class */
-.no { color: #008080 } /* Name.Constant */
-.nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
-.ni { color: #800080 } /* Name.Entity */
-.ne { color: #990000; font-weight: bold } /* Name.Exception */
-.nf { color: #990000; font-weight: bold } /* Name.Function */
-.nl { color: #990000; font-weight: bold } /* Name.Label */
-.nn { color: #555555 } /* Name.Namespace */
-.nt { color: #000080 } /* Name.Tag */
-.nv { color: #008080 } /* Name.Variable */
-.ow { color: #000000; font-weight: bold } /* Operator.Word */
-.w { color: #bbbbbb } /* Text.Whitespace */
-.mf { color: #009999 } /* Literal.Number.Float */
-.mh { color: #009999 } /* Literal.Number.Hex */
-.mi { color: #009999 } /* Literal.Number.Integer */
-.mo { color: #009999 } /* Literal.Number.Oct */
-.sb { color: #d01040 } /* Literal.String.Backtick */
-.sc { color: #d01040 } /* Literal.String.Char */
-.sd { color: #d01040 } /* Literal.String.Doc */
-.s2 { color: #d01040 } /* Literal.String.Double */
-.se { color: #d01040 } /* Literal.String.Escape */
-.sh { color: #d01040 } /* Literal.String.Heredoc */
-.si { color: #d01040 } /* Literal.String.Interpol */
-.sx { color: #d01040 } /* Literal.String.Other */
-.sr { color: #009926 } /* Literal.String.Regex */
-.s1 { color: #d01040 } /* Literal.String.Single */
-.ss { color: #990073 } /* Literal.String.Symbol */
-.bp { color: #999999 } /* Name.Builtin.Pseudo */
-.vc { color: #008080 } /* Name.Variable.Class */
-.vg { color: #008080 } /* Name.Variable.Global */
-.vi { color: #008080 } /* Name.Variable.Instance */
-.il { color: #009999 } /* Literal.Number.Integer.Long */