並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 23 件 / 23件

新着順 人気順

RedCarpetの検索結果1 - 23 件 / 23件

  • Railsでカスタムmarkdownを実装する - たのしい人生

    2013-09-19 Railsでカスタムmarkdownを実装する Railsでブログ実装したくなることないですか? その際に記法の選択肢の一つにmarkdownが出てくると思います。 redcarpetを使うと簡単にmarkdownを実装できるので、その方法をまとめました。 Redcarpetでmarkdownを実装する Gemfileにredcarpetを追加 gem 'redcarpet' helperにメソッドを作る app/helpers/markdown_helper.rb など作って、 module MarkdownHelper def markdown(text) unless @markdown renderer = Redcarpet::Render::HTML.new @markdown = Redcarpet::Markdown.new(renderer) e

    • Rubyで使えるMarkdownパーサー - ひげろぐ

      なぜだか知らないけどたくさんある。 Markup processors in The Ruby Toolbox RDiscountとBlueClothが定番で、Redcarpet(GitHub-Markupで内部的に使われているもの)が元気なニューフェイスといったところか。 違いは速度と拡張記法のサポート具合なのかな。 Markdownはシンプルだけどその分できることは限られているので独自拡張のニーズや実装がいくつもあるようだ。 拡張自体はどこかに仕様があるのか、それとも各ライブラリが勝手にやっているのかちょっと追いかけられていない。 気に入った拡張記法をサポートしているかどうかが選択のポイントか。 速度は速いに越したことはないが、個人ユースではそんなに気にする必要はないように思う。 BlueCloth BlueClothが古くからあるものなので、後発のものもBlueCloth互換のAPI

      • GitHub - vmg/redcarpet: The safe Markdown parser, reloaded.

        You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

          GitHub - vmg/redcarpet: The safe Markdown parser, reloaded.
        • Railsでカスタムmarkdownを実装する - k0kubun's blog

          Railsでブログ実装したくなることないですか? その際に記法の選択肢の一つにmarkdownが出てくると思います。 redcarpetを使うと簡単にmarkdownを実装できるので、その方法をまとめました。 Redcarpetでmarkdownを実装する Gemfileにredcarpetを追加 gem 'redcarpet' helperにメソッドを作る app/helpers/markdown_helper.rb など作って、 module MarkdownHelper def markdown(text) unless @markdown renderer = Redcarpet::Render::HTML.new @markdown = Redcarpet::Markdown.new(renderer) end @markdown.render(text).html_safe e

            Railsでカスタムmarkdownを実装する - k0kubun's blog
          • Redcarpet2のざっくりまとめ - おもしろwebサービス開発日記

            githubで使われているMarkdown用ライブラリRedcarpetが後方互換性のない version 2 になるみたいです。現時点のバージョンは 2.0.0b3 で、まだ本リリースではないようですが、これから使うなら2の方を勉強しておくべきだと思うのでまとめます。 基本的にいつものようなREADMEの意訳です。 基本情報 Redcapet は Redcloth の代換として使われてきたけど、バージョン2からは独自のAPIを持つようになる。 Redcarpet は Sundown という名前の Markdown をパースする拡張ライブラリを利用している。詳しくはこちら。 インストール 下記のようにインストールする(ただし、現在は普通にインストールすると1系が入ります)。native extensionsがビルドされるけど、スタンドアロンなので他のライブラリをインストールしておく必要は無

              Redcarpet2のざっくりまとめ - おもしろwebサービス開発日記
            • #272 Markdown with Redcarpet - RailsCasts

              Download: source codeProject Files in Zip (204 KB)mp4Full Size H.264 Video (12.4 MB)m4vSmaller H.264 Video (7.75 MB)webmFull Size VP8 Video (8.32 MB)ogvFull Size Theora Video (19.8 MB) 3ヶ月ほど前にGithubがRedcarpetというRuby gemを導入しました。このgemはMarkdownコードを解釈するのに使われ、Githubではドキュメントをマークアップする簡単な方法としてUpskirtライブラリと共に内部的に採用されています。操作方法も簡単なこのRedcarpetを使って、今回のエピソードではRailsアプリケーションに追加する方法およびカスタマイズの方法、またコードブロックをシンタックスハイラ

              • Rolling out the Redcarpet

                CommunityRolling out the RedcarpetHere at GitHub, we love Markdown. We use it everywhere: to render the wikis, issues, pull requests, and all user-generated comments. We even encourage developers to write their READMEs in… Here at GitHub, we love Markdown. We use it everywhere: to render the wikis, issues, pull requests, and all user-generated comments. We even encourage developers to write their

                  Rolling out the Redcarpet
                • ASCIIcasts - “Episode 272 - RedcarpetでMarkdown”

                  272: RedcarpetでMarkdown  (view original Railscast) Other translations: Other formats: Written by Naomi Fujimoto 3ヶ月ほど前にGithubがRedcarpetというRuby gemを導入しました。このgemはMarkdownコードを解釈するのに使われ、Githubではドキュメントをマークアップする簡単な方法としてUpskirtライブラリと共に内部的に採用されています。操作方法も簡単なこのRedcarpetを使って、今回のエピソードではRailsアプリケーションに追加する方法およびカスタマイズの方法、またコードブロックをシンタックスハイライトする方法を紹介します。 下の簡単なブログアプリケーションを使って作業を行っていきます。下の記事に入力した内容はHTMLとして直接出力されるの

                  • Jekyll の 0.12.0 でシンタックス ハイライトが便利になった

                    ※ これは Jekyll アドベントカレンダー の 25 日目の記事です このブログの生成にも利用している Jekyll が約 1 年ぶりにバージョン アップして 0.12.0 になった。RubyGems に公開されているので、gem update で更新できるはず。 この記事では、0.12.0 で個人的に注目している「シンタックス ハイライトに関する改善点」を 2 つ紹介する。 Jekyll の良さについては、俺の最強ブログ システムが火を噴くぜ で記事にしているので、知らない人はそちらからどうぞ。 Redcarpet 2 のサポート まず 1 つ目は Redcarpet 2 のサポート。 Redcarpet は GitHub の中の人によって開発されている Markdown パーサーて、GitHub Flavored Markdown が使えるのが大きな特徴。 これまでも Jekyll

                      Jekyll の 0.12.0 でシンタックス ハイライトが便利になった
                    • Markdown記法チートシート(redcarpet) - さかなチキンぱん。

                      RubyのMarkdownライブラリ「redcarpet(レッドカーペット)」で利用できる記法のチートシート。 jekyll のMarkdownエンジンにredcarpetを使っているので備忘録の為に書きました。 redcarpetで拡張された記法に関しては分かるように書いています。 見出し(h1-6)

                      • Rubyで動くmarkdownパーサー|Redcarpet - むかぁ~ どっと こむ

                        Rubyのmarkdownパーサー「Redcarpet」の紹介です。 GitHub内部で使われているので実績あるそうです。 とりあえず手っ取り早く動かしてみました。 本家 GitHub Redcarpet インストール cmd gem install redcarpet サンプル ruby # -*- coding: utf-8 -*- require 'redcarpet' markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML) source= ' # 見出し1 ## 見出し2 * リスト1 * リスト2 このサイトは[mukaer.com](http://mukaer.com)です。 ' puts markdown.render(source) result <h1>見出し1</h1> <h2>見出し2</h2> <ul>

                        • redcarpetとgithub-markdownの違い.md

                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                            redcarpetとgithub-markdownの違い.md
                          • Syntax Highlighting in Ruby on Rails — Blog by Marcin Szczepaniak —

                            Rouge It's free and open source gem written by Jay Adkisson in pure Ruby with no other dependencies, so there is no need for any bridge like in Pygments. But generated HTML is fully compatible with pygments stylesheets. Supports many languages and is still in active development. See It's quite fast. If you want to check comparison with other highlighters. See Rouge with Redcarpet For Redcarpet in

                            • text.ssig33.com - GFM と SHJS でシンタックスハイライトするの幸福度高い。

                              GFM と SHJS でシンタックスハイライトするの幸福度高い。 先日 node.js でこのサイト書き直したばかり ですが、ライブラリとかが不足しててダルいので Ruby に戻ってきました。 Ruby いいですね、やっぱ。 ところでこれまでここにコード貼っても Syntax Hilight できていなかったのでやれるようにしました。サーバーサイドとクライアントサイドのあわせわざです。 サーバーサイドでの HTML の作成 require 'redcarpet' Redcarpet.new(text, :fenced_code, :gh_blockcode).to_html クライアントサイドで Syntax Hilight する(html 見て)。 $.each($("pre code"), function(){ var code = $(this); var text = code.

                              • Markdown in Ruby on Rails — Blog by Marcin Szczepaniak —

                                Redcarpet It's a free Ruby library for Markdown created by Vicent Martí. See to use Redcarpet put in Gemfile: gem 'redcarpet' to install: $ bundle define method in ./app/helper/application_helper.rb: def markdown(text) render_options = { # will remove from the output HTML tags inputted by user filter_html: true, # will insert <br /> tags in paragraphs where are newlines # (ignored by default) ha

                                • Rails Markdown サンプルアプリ - Qiita

                                  環境 - Rails 4.1 サンプル - https://github.com/usutani/note_md 参考 ASCIIcasts - “Episode 272 - RedcarpetでMarkdown” masuidrive/open-wripe vmg/redcarpet 実装 Markdownで記述できるメモアプリを作成したいと思います。 rails _4.1.1_ new note_md cd note_md rails g scaffold Page body:text rake db:migrate

                                    Rails Markdown サンプルアプリ - Qiita
                                  • nanoc導入メモ 4/5 「Markdown独自拡張」編 - ナレッジエース

                                    おそらく、誰もがやる深夜のWebサーフィンは、究極のところ時間の無駄ではないのかもしれない。 それは、Webで夢をみているのにほかならないのだ。(T.B=リー「Webの創成」より) Created at: 2012-05-05 | Tags: nanoc nanocの醍醐味は、なんといってもRubyによるカスタマイズで記事の作成を効率化したり、挙動を細かく調整できることです。 ここでは番外編として、記事の作成に深く関わるMarkdown周辺のカスタマイズを紹介します。 日本語Markdown Markdownの見出しは通常#の連続やアンダーラインで表しますが、当サイトでは日本語のテキストでよく使われる「■」と「●」で代用しています。 実装は「lib/default.rb」で文字列を置き換えるフィルタを定義し、「Rules」でMarkdownのフィルタより先に適用するだけです。 class

                                    • Chiranoura

                                      MathJaxを使ってtex形式で書いた数式を表示できるようにしました。 通常はhtmlに数行追加するだけで使えるようになります。 ただ、markdownでも数式を書けるようにするためには、レンダラの定義が必要だったのでメモしておきます。 nanoc(http://nanoc.ws) Redcarpet(https://github.com/vmg/redcarpet) MathJax(http://www.mathjax.org) まずはテンプレートにMathJaxの設定を追加します。現在IE8対策は必要ないようです。 In MathJax v2.0, IE8 and IE9 run faster in their IE8 and IE9 standards mode than in IE7 emulation mode. (http://www.mathjax.org/resource

                                      • Rails tips: Railsアプリにシンタックスハイライト機能を追加する(翻訳)|TechRacho by BPS株式会社

                                        概要 原著者の許諾を得て翻訳・公開いたします。 英語記事: Paweł Dąbrowski | Add beautiful code syntax highlighting to ... 原文公開日: 2018/05/30 著者: Paweł Dąbrowsk コードのシンタックスハイライト機能は、開発者向けブログやWebサイトでコードスニペットを表示するのになくてはならないものです。JekyllやWordPressなどのブログエンジンを使っているなら簡単にシンタックスハイライト機能を追加できますが、Railsアプリにも簡単に追加する方法があります。 今回のねらい 美しいシンタックスハイライト機能を追加すると同時に、コードをデータベースに安全に保管して簡単に編集できるようにもしてみたいと思います。必要な要件をすべてリストアップしてみました。 コードのハイライト機能 ハイライトのテーマを簡単

                                          Rails tips: Railsアプリにシンタックスハイライト機能を追加する(翻訳)|TechRacho by BPS株式会社
                                        • How to extend the Redcarpet 2 Markdown library?

                                          As you may now, this blog is powered by Jekyll, and the posts on it are written in Markdown (by the way, you should adopt the Markdown Mindset). But by default, the markdown parser for Jekyll doesn't understand the fenced code blocks that Github Flavored Markdown introduced. And as a daily user of Github, it was something that I really wanted. So I wrote a plugin for Jekyll based on the redcarpet

                                          • “Zellweger Makes Rare Red Carpet Appearance” - NewsAntenna

                                            Zellweger Makes Rare Red Carpet AppearanceRenee Zellweger makes a rare red carpet appearance at the Elle Women in Hollywood awards. Read more on “NTDTV”

                                            • Markdown 書式のリストからリンクを抜き出す - ブログ

                                              Redcarpet と Nokogiri に全力で乗っかっていく なぜ書くのか テストを書く(RSpec) 実装を書く Links なぜ書くのか 「なんとなく」が答え 普段、Google Chrome 拡張の Copy as Markdown を使っている それがあるとタブの情報(タイトル, URL)を、複数選択して一度に取ってこれる そこからURL やタイトルを個別に持ってこられると他の用途として処理を組み込んだり利用できそうな気がした テストを書く(RSpec) テストを書くのと実装を書く順序は "絶対遵守" ではないので、あまり気にしない("二人三脚" のためにある) でも今回は簡単な内容なのでテストを先に書く describe LinkExtractor do context 'passing multiple link with markdown style list' do l

                                                Markdown 書式のリストからリンクを抜き出す - ブログ
                                              • Best of Cannes

                                                Highlights from the 68th edition of the film festival on the French Riviera. Actor Vincent Lindon, Best Actor award winner for his role in the film "La loi du marche" (The Measure of a Man), poses during a photocall after the closing ceremony of the 68th Cannes Film Festival in Cannes, southern France, May 24, 2015. REUTERS/Benoit Tessier

                                                1