hugo/hugolib
Bjørn Erik Pedersen b08d9f26ae Make replaceShortcodeTokens rewrite the input slice
Currently a `[]byte` copy is returned. In most cases this is the safe thing to do, but we should just modify/grow the slice as needed.

This is faster and consumes less memory:

```
benchmark                             old ns/op     new ns/op     delta
BenchmarkReplaceShortcodeTokens-4     7350          4419          -39.88%

benchmark                             old allocs     new allocs     delta
BenchmarkReplaceShortcodeTokens-4     5              1              -80.00%

benchmark                             old bytes     new bytes     delta
BenchmarkReplaceShortcodeTokens-4     4816          1152          -76.08%
```

This commit is aso a small spring cleaning of duplicated code in the different `PageConvert` methods.

Fixes #1516
2015-11-17 18:24:17 +01:00
..
author.go
benchmark_test.go
datafiles_test.go Do not fail on unknown files in /data 2015-04-22 18:35:56 +02:00
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 Make replaceShortcodeTokens rewrite the input slice 2015-11-17 18:24:17 +01:00
handler_test.go Adding default handler & tests Fixes #147 2015-05-20 18:55:24 -04:00
hugo.go
media.go
menu.go Use Identifier as last sort resort for default menu sort 2015-11-09 21:02:21 +01:00
menu_test.go fix TestHomeNodeMenu test 2015-07-14 21:31:47 +02:00
node.go Add Param(key) to Node and Page 2015-10-12 06:11:01 +02:00
page.go Make replaceShortcodeTokens rewrite the input slice 2015-11-17 18:24:17 +01: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 Export Page.Layout 2015-11-02 17:24:50 +01:00
page_time_integration_test.go
pageCache.go Move apply before cache put 2015-07-24 00:28:21 +02:00
pageCache_test.go Fix data races in sorting and Reverse 2015-07-23 12:43:57 +02:00
pageGroup.go Fix GroupByParam to return original param string 2015-11-10 14:57:03 +01:00
pageGroup_test.go Fix GroupByParam to return original param string 2015-11-10 14:57:03 +01:00
pageSort.go Use filepath as the last default sort key for pages 2015-09-30 05:43:11 +02:00
pageSort_test.go Fix sort test and title sort 2015-07-25 17:22:46 +02:00
pagesPrevNext.go
pagesPrevNext_test.go
pagination.go Remove deprecated fields and methods for v0.15 2015-07-30 13:33:38 +02:00
pagination_test.go Remove deprecated fields and methods for v0.15 2015-07-30 13:33:38 +02:00
path_separators_test.go Export Page.Layout 2015-11-02 17:24:50 +01:00
path_separators_windows_test.go Update test logs for uniformity and consistency 2015-05-08 22:27:00 -04:00
permalinks.go Fix UTF8 permalink 2015-05-17 14:54:59 +02:00
permalinks_test.go
planner.go Export Page.Layout 2015-11-02 17:24:50 +01:00
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 Add map support to scratch 2015-08-02 17:23:36 +02:00
scratch_test.go Add map support to scratch 2015-08-02 17:23:36 +02:00
shortcode.go Make replaceShortcodeTokens rewrite the input slice 2015-11-17 18:24:17 +01:00
shortcode_test.go Make replaceShortcodeTokens rewrite the input slice 2015-11-17 18:24:17 +01:00
shortcodeparser.go Fix trivial typos in code 2015-11-16 07:15:17 -07:00
shortcodeparser_test.go
site.go simplify rssuri logic 2015-11-15 11:05:16 -05: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 Complete the Url-to-URL transition in tests 2015-09-13 05:21:24 -06: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 config option "disablePathToLower" 2015-09-01 15:26:02 +02:00
taxonomy_test.go