hugo/hugolib
Bjørn Erik Pedersen 004fcddc80 Remove superfluous p-tags around shortcodes
This commit replaces the regexp driven `replaceShortcodeTokens` with a handwritten one.

It wasnt't possible to handle the p-tags case without breaking performance.

This fix actually improves in that area:

```
benchmark                           old ns/op     new ns/op     delta
BenchmarkParsePage                  142738        142667        -0.05%
BenchmarkReplaceShortcodeTokens     665590        575645        -13.51%
BenchmarkShortcodeLexer             176038        181074        +2.86%

benchmark                           old allocs     new allocs     delta
BenchmarkParsePage                  87             87             +0.00%
BenchmarkReplaceShortcodeTokens     9631           9424           -2.15%
BenchmarkShortcodeLexer             274            274            +0.00%

benchmark                           old bytes     new bytes     delta
BenchmarkParsePage                  141830        141830        +0.00%
BenchmarkReplaceShortcodeTokens     52275         35219         -32.63%
BenchmarkShortcodeLexer             30177         30178         +0.00%
```

Fixes #1148
2015-06-21 22:51:12 +02:00
..
author.go
benchmark_test.go
datafiles_test.go
handler_base.go
handler_file.go Adding default handler & tests Fixes #147 2015-05-20 18:55:24 -04:00
handler_meta.go Adding default handler & tests Fixes #147 2015-05-20 18:55:24 -04:00
handler_page.go Remove superfluous p-tags around shortcodes 2015-06-21 22:51:12 +02:00
handler_test.go Adding default handler & tests Fixes #147 2015-05-20 18:55:24 -04:00
hugo.go
media.go
menu.go
menu_test.go Comment out mystery test 2015-06-21 22:28:50 +02:00
node.go Add IsHome 2015-05-28 03:20:08 +02:00
page.go Remove superfluous p-tags around shortcodes 2015-06-21 22:51:12 +02:00
page_permalink_test.go Support Fish and Chips section 2015-05-28 23:05:17 +02:00
page_taxonomy_test.go
page_test.go Fix FullFilePath 2015-05-31 18:54:20 +02:00
page_time_integration_test.go
pageGroup.go
pageGroup_test.go
pageSort.go
pagesPrevNext.go
pagesPrevNext_test.go
pagination.go
pagination_test.go Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
path_separators_test.go
path_separators_windows_test.go
permalinks.go Fix UTF8 permalink 2015-05-17 14:54:59 +02:00
permalinks_test.go
planner.go
redis.cn.md
rss_test.go Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
scratch.go
scratch_test.go
shortcode.go Remove superfluous p-tags around shortcodes 2015-06-21 22:51:12 +02:00
shortcode_test.go Remove superfluous p-tags around shortcodes 2015-06-21 22:51:12 +02:00
shortcodeparser.go
shortcodeparser_test.go
site.go Revert "add preliminary support for content/index.md file to be homepage content" 2015-06-21 15:01:09 +02:00
site_show_plan_test.go Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
site_test.go Remove superfluous p-tags around shortcodes 2015-06-21 22:51:12 +02:00
site_url_test.go Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
siteinfo_test.go Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
siteJSONEncode_test.go Silence chatty JSON test 2015-06-06 20:57:13 +02:00
sitemap.go
sitemap_test.go Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
summary.go
taxonomy.go Add PreserveTaxonomyNames flag 2015-05-31 20:30:53 +02:00
taxonomy_test.go