Syntax highlighting in fenced code blocks
Python
@requires_authorization
def somefunc(param1='', param2=0):
r'''A docstring'''
if param1 > param2: # interesting
print 'Gre\'ater'
return (param2 - param1 + 1 + 0b10l) or None
class SomeClass:
pass
# note
>>> message = '''interpreter
... prompt'''
SQL
BEGIN;
CREATE TABLE "topic" (
-- This is the greatest table of all time
"id" serial NOT NULL PRIMARY KEY,
"forum_id" integer NOT NULL,
"subject" varchar(255) NOT NULL -- Because nobody likes an empty subject
);
ALTER TABLE "topic" ADD CONSTRAINT forum_id FOREIGN KEY ("forum_id") REFERENCES "forum" ("id");
-- Initials
insert into "topic" ("forum_id", "subject") values (2, 'D''artagnian');
/*
-- this line lacks ; at the end to allow people to be sloppy and omit it in one-liners
*/
COMMIT
Ruby
class A < B; def self.create(object = User) object end end
class Zebra; def inspect; "X#{2 + self.object_id}" end end
module ABC::DEF
include Comparable
# @param test
# @return [String] nothing
def foo(test)
Thread.new do |blockvar|
ABC::DEF.reverse(:a_symbol, :'a symbol', :<=>, 'test' + ?\012)
answer = valid?4 && valid?CONST && ?A && ?A.ord
end.join
end
def [](index) self[index] end
def ==(other) other == self end
end
class Car < ActiveRecord::Base
has_many :wheels, class_name: 'Wheel', foreign_key: 'car_id'
scope :available, -> { where(available: true) }
end
hash = {1 => 'one', 2 => 'two'}
2.0.0p0 :001 > ['some']
=> ["some"]
HTML, XML
<?xml version="1.0"?>
<response value="ok" xml:lang="en">
<text>Ok</text>
<comment html_allowed="true"/>
<ns1:description><![CDATA[
CDATA is <not> magical.
]]></ns1:description>
<a></a> <a/>
</response>
<!DOCTYPE html>
<title>Title</title>
<style>body {width: 500px;}</style>
<script type="application/javascript">
function $init() {return true;}
</script>
<body>
<p checked class="title" id='title'>Title</p>
<!-- here goes the rest of the page -->
</body>
Syntax highlighting in fenced code blocks的更多相关文章
- [VSCode] Adding Custom Syntax Highlighting to a Theme in VSCode
VSCode Themes are a quick way to update the color scheme and syntax highlighting of your code, but y ...
- code::blocks的快捷键汇总
编辑部分: Ctrl + A:全选 Ctrl + C:复制 Ctrl + X: 剪切 Ctrl + V:粘贴 Ctrl + Z:撤销 Ctrl + S:保存 Ctrl + Y / Ctrl + S ...
- code blocks 快捷键
设置快捷键可以在setting-Editor-keyboard shortcuts里设置 ==日常编辑== • 按住Ctrl滚滚轮,代码的字体会随你心意变大变小.• 在编辑区按住右键可拖动代码,省去拉 ...
- Code::Blocks 配置
需要另外下载安装GCC编译器 配置主题皮肤: 先替换' default.conf ' (需要关闭code::blocks) Settings>Editor>(左栏)Syntax highl ...
- Code::Blocks代码自动提示设置及常用快捷键
Code::Blocks代码自动提示设置及常用快捷键(适用windows和linux) 1)以下需要设置的地方均在Settings->Editor...弹出的对话框中. 2)不少命令都可针对当前 ...
- Code::Blocks项目配置基础
File 菜单 New :新建( Empty file/file . class . project . build target ) . Recent projects/files :近期打开的项目 ...
- PGI Compiler for OpenACC Output Syntax Highlighting
PGI Compiler for OpenACC Output Syntax Highlighting When use the PGI compiler to compile codes with ...
- How to turn on syntax highlighting in osx
put follow code in ~/.vimrc set ai " auto indenting set history=100 " keep 100 lines of hi ...
- 从Script到Code Blocks、Code Behind到MVC、MVP、MVVM
刚过去的周五(3-14)例行地主持了技术会议,主题正好是<UI层的设计模式——从Script.Code Behind到MVC.MVP.MVVM>,是前一天晚上才定的,中午花了半小时准备了下 ...
随机推荐
- jQuery基础知识准备
一. 代码风格在jQuery程序中,不管是页面元素的选择.内置的功能函数,都是美元符号"$"来起始的.而这个"$"就是jQuery当中最重要且独有的对象:jQu ...
- Android开发环境(IDE)
一:Eclipse 1.装JDK: 2.装Eclipse://应与JDK同为32/64位. 3.装ADT: 4.装android sdk: 推荐下载ADT bundle包(包含Eclipse,Andr ...
- ContentControl与ContentPresenter区别?
<TextBlock HorizontalAlignment="Left" Text="{Binding HwContent, Converter={StaticR ...
- Trie URAL 7192 Chip Factory (15长春J)
题目传送门 题意:从n个数中选出不同的三个数a b c,使得(a+b)^c 最大 分析:先将所有数字按位插入到字典树上,然后删除两个数字,贪心询问与剩下的数字最大异或值. /************* ...
- ggplot2包的说明文档[分享]
- BC一周年练习赛
Souvenir Accepts: 901 Submissions: 2743 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262 ...
- Excel转Json,Json转CSharp
一份给策划最好的礼物!就是:Excel2Json2CSharp 策划配置Excel,动不动就要改数值啊,增加字段啊. 程序这边对应的解析类就得改动啊.整一个麻烦了得! 所以我就整理了这个Excel2J ...
- ZeroMQ接口函数之 :zmq_inproc – ØMQ 本地进程内(线程间)传输方式
ZeroMQ API 目录 :http://www.cnblogs.com/fengbohello/p/4230135.html ——————————————————————————————————— ...
- java分享第十天(http协议简介)
URL模式URL(Uniform Resource Locator) 地址用于描述一个网络上的资源, 基本格式如下scheme 指定低层使用的协议(例如:http, https, ftp)host H ...
- ECMAScript Web APIs node.js
https://hacks.mozilla.org/2015/04/es6-in-depth-an-introduction/ What falls under the scope of ECMASc ...