From b5c56090ee5f71134b85e3cdf7e3b89093649fac Mon Sep 17 00:00:00 2001 From: Ruy Diaz Date: Sat, 1 Apr 2017 21:35:20 -0700 Subject: Add anchor links to all headers To allow easy linking at all levels and not just from index --- guides/rails_guides/markdown.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'guides/rails_guides/markdown.rb') diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb index bf2cc82c7c..16aaa7d1eb 100644 --- a/guides/rails_guides/markdown.rb +++ b/guides/rails_guides/markdown.rb @@ -105,6 +105,10 @@ module RailsGuides node.inner_html = "#{node_index(hierarchy)} #{node.inner_html}" end end + + doc.css('h3, h4, h5, h6').each do |node| + node.inner_html = "#{node.inner_html}" + end end.to_html end end -- cgit v1.2.3 From 0871e5e5c1e6151a7ed3bdf7b22209ac11532b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 19 Apr 2017 20:02:03 -0400 Subject: Fix all style guides violations Closes #28382 Closes #28651 --- guides/rails_guides/markdown.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/rails_guides/markdown.rb') diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb index 16aaa7d1eb..02d58601c4 100644 --- a/guides/rails_guides/markdown.rb +++ b/guides/rails_guides/markdown.rb @@ -106,7 +106,7 @@ module RailsGuides end end - doc.css('h3, h4, h5, h6').each do |node| + doc.css("h3, h4, h5, h6").each do |node| node.inner_html = "#{node.inner_html}" end end.to_html -- cgit v1.2.3 From cfade1ec7ee7b5b51f3c1578e3474f9c156f2971 Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Thu, 22 Jun 2017 22:59:18 -0400 Subject: Enforce frozen string in Rubocop --- guides/rails_guides/markdown.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'guides/rails_guides/markdown.rb') diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb index 02d58601c4..cad66b5d6d 100644 --- a/guides/rails_guides/markdown.rb +++ b/guides/rails_guides/markdown.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "redcarpet" require "nokogiri" require "rails_guides/markdown/renderer" -- cgit v1.2.3 From 87b3e226d65ac1ed371620bfdcd2f950c87cfece Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Sun, 2 Jul 2017 02:15:17 +0930 Subject: Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. --- guides/rails_guides/markdown.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'guides/rails_guides/markdown.rb') diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb index cad66b5d6d..02d58601c4 100644 --- a/guides/rails_guides/markdown.rb +++ b/guides/rails_guides/markdown.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "redcarpet" require "nokogiri" require "rails_guides/markdown/renderer" -- cgit v1.2.3