Commit Graph

19 Commits

Author SHA1 Message Date
Brandon Mathis
35d2077ccc fixed the embedded example in include_code plugin 2012-06-05 00:09:01 -05:00
Brandon Mathis
cf0d5b80cf Improvements to code plugins
- Range options are now properly stripped out of code plugin markup
- Markers now add start and end class names for more style control
- code_block plugin properly passes markings in highlight options
- Deprecated title before file name syntax for include_code
2012-06-03 00:19:06 -05:00
Brandon Mathis
b867b0877d Refactored code plugins so that shared regexes are mixed in methods
Added option to mark one line or groups of lines in a code block

Relates to issue #584
2012-05-28 04:29:18 -05:00
Brandon Mathis
e16844af29 Improvements to Code embedding features
1. Removed lots of duplication
2. Added warnings and fixed some dim regex
3. New: set a start line number for any code snippet
4. New: set a start, end, or range for include_code
5. New: added option to disable line numbers linenos:false

Fixes #478 #484
2012-05-27 02:30:17 -05:00
Frederic Hemberger
44e4a991cf Fixes styling of <figure> code header 2011-09-18 21:27:42 +02:00
Brandon Mathis
3d2d1a8be4 1. Vastly improved backtick code blocks and added support for Textile
2. Refactored Octopress filters into Liquid filters and pre/post render filters (using post_filters plugin)
3. Added methods to raw plugin to prevent Markdown and Textile from parsing blocks
4. Updated render partial to invoke the pre_render method of post_filters
5. Moved Rubypants filter out of default.html into Octopress post_render filters
6. Added raw's safe_wrapper method to codeblock and include_code filters
2011-09-07 18:34:21 -05:00
Brandon Mathis
11c6e1f7a7 include_code now defaults to relative urls for easy testing on a development server 2011-08-21 16:16:03 -04:00
Brandon Mathis
089af26b02 improved lang:language for codeblock and include code. It no longer strips out surrounding whitespace. 2011-08-21 10:31:58 -04:00
Brandon Mathis
83d87f98cc added option to force syntax highlighting language, example: {% include_code file lang:ruby %}. Fixes #108 2011-08-20 20:25:07 -04:00
Brandon Mathis
358d02a4a7 centralized pygments aliases into pygments_code.rb. Added alias for .ru (ruby), which sort of fixes #108 2011-08-20 18:39:47 -04:00
Brandon Mathis
7b52fb492e added yml alias for yaml code highlighting 2011-08-01 17:35:44 -04:00
Brandon Mathis
6009daa8a2 code_block and inlcude_code no longer needlessly render through the Liquid template parser 2011-08-01 16:28:07 -04:00
Brandon Mathis
20de112526 include_code is now more forgiving, stripping leading forward slashes from the code_dir config 2011-07-29 10:49:54 -04:00
Brandon Mathis
7b81aab5ac added support for pygments.rb removing dependency on pygments, added support for caching highlighted code from pygments.rb and added default line numbering. Javascript auto line numbering now only occurs for embedded gists 2011-07-26 23:36:42 -04:00
Brandon Mathis
20764e31ee updated syntax highlighting support for perl and objective c in code_block and include_code plugins 2011-07-25 20:35:24 -04:00
Brandon Mathis
44e1351fc7 1. Added condition to full_url filter to allow it to be used as a root_url appending filter for remapping root "/" urls when octopress is deployed to a subdirectory. Updated _includes/article and _layouts/page to use the filter
2. Added documentation for the include_code plugin
2011-07-21 16:14:23 -04:00
Brandon Mathis
c030550917 added optional title to include code tag 2011-07-20 11:03:10 -04:00
Brandon Mathis
6f646e7290 added <div> wrappers to code blocks because rdiscount stupidly wraps <figure> tags with paragraphs. Grr. 2011-07-19 18:00:56 -04:00
Brandon Mathis
17c59fb1d1 Moved plugins to root directory. I'm ditching the idea of shipping plugins with themes until it's more obviously necessary. This way it's easier to merge and update plugins. 2011-07-19 09:06:54 -04:00