Repository: struts-site
Updated Branches:
refs/heads/master 7ccd3bea1 -> 1767fe7b7
Resolves problem with including part of html file
Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/1767fe7b
Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/1767fe7b
Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/1767fe7b
Branch: refs/heads/master
Commit: 1767fe7b7c9df1e8c193035fa9e4d44a302ce1b1
Parents: 7ccd3be
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Fri Sep 22 08:16:59 2017 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Fri Sep 22 08:16:59 2017 +0200
----------------------------------------------------------------------
source/_plugins/tag_parameters.rb | 7 ++++---
source/tag-developers/a-tag.md | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts-site/blob/1767fe7b/source/_plugins/tag_parameters.rb
----------------------------------------------------------------------
diff --git a/source/_plugins/tag_parameters.rb b/source/_plugins/tag_parameters.rb
index 048f86c..aaaa269 100644
--- a/source/_plugins/tag_parameters.rb
+++ b/source/_plugins/tag_parameters.rb
@@ -1,4 +1,4 @@
-require 'net/http'
+require 'open-uri'
require 'uri'
require 'cgi'
@@ -22,14 +22,15 @@ module Jekyll
def render(context)
if @content
- @content[/#{Regexp.escape('<!-- START SNIPPET: tagattributes -->')}(.*?)#{Regexp.escape('<!--
END SNIPPET: tagattributes -->')}/m, 1]
+ parameters = @content[/#{Regexp.escape('<!-- START SNIPPET: tagattributes -->')}(.*?)#{Regexp.escape('<!--
END SNIPPET: tagattributes -->')}/m, 1]
+ "<p>" + parameters + "</p>"
else
raise 'Something went wrong in TagParameters'
end
end
def fetchContent(url)
- Net::HTTP.get(URI.parse(URI.encode(url.strip)))
+ open(URI.parse(URI.encode(url.strip))).read.chomp
end
end
end
http://git-wip-us.apache.org/repos/asf/struts-site/blob/1767fe7b/source/tag-developers/a-tag.md
----------------------------------------------------------------------
diff --git a/source/tag-developers/a-tag.md b/source/tag-developers/a-tag.md
index 5aac77b..19ba144 100644
--- a/source/tag-developers/a-tag.md
+++ b/source/tag-developers/a-tag.md
@@ -29,7 +29,7 @@ If you want to use additional parameters in your `s:a` the best practice
is to u
leverage this url into your `s:a` tag. This is done by creating a `s:url` and specifying
an `var` attribute. Like `testUrlId`
in this example. Then in the `s:a` tag reference this id in the href attribute via `%{testUrlId}`
-```jsp
+```html
<s:url var="testUrlId" namespace="/subscriber" action="customField" method="delete">
<s:param name="customFieldDefinition.id" value="${id}"/>
</s:url>
|