From 36811490d0999c2c49d64d14c2ed1b963c951aa9 Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Fri, 27 Mar 2020 12:20:52 +0100 Subject: [PATCH] Add --lenient-tag-lookup option (#1505) --- HISTORY.md | 2 +- README.md | 3 +-- bin/gollum | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index ac65657d..51deba67 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,7 +2,7 @@ This is a major new release that substantially cleans up and improves the codebase. It also introduces many new features, bugfixes, and removing major limitations. See [here](https://github.com/gollum/gollum/wiki/5.0-release-notes) for a list of changes. -**Note**: due to changes to the way in which Gollum handles filenames, you may have to change some links in your wiki when migrating from gollum 4.x. See the [release notes](https://github.com/gollum/gollum/wiki/5.0-release-notes#migrating-your-wiki) for more details. You may be able to use the `bin/gollum-migrate-tags` script to accomplish this. +**Note**: due to changes to the way in which Gollum handles filenames, you may have to change some links in your wiki when migrating from gollum 4.x. See the [release notes](https://github.com/gollum/gollum/wiki/5.0-release-notes#migrating-your-wiki) for more details. You may be able to use the `bin/gollum-migrate-tags` script to accomplish this. Also see the `--lenient-tag-lookup` option. Many thanks to all the users who have provided feedback, and everyone who has chipped in in the development process! diff --git a/README.md b/README.md index b4c0a86c..567e4333 100644 --- a/README.md +++ b/README.md @@ -126,8 +126,7 @@ Gollum comes with the following command line options: | --template-dir | [PATH] | Specify custom mustache template directory. | | --template-page | none | Use _Template in root as a template for new pages. Must be committed. | | --emoji | none | Parse and interpret emoji tags (e.g. `:heart:`) except when the leading colon is backslashed (e.g. `\:heart:`). | -| --global-tag-lookup | none | Match an internal link to 'Foo' with the first page found with that filename, anywhere in the repository. Provides compatibility with Gollum 4.x. | -| --hyphened-tag-lookup | none | Match an internal link to 'Bilbo Baggins' with 'Bilbo-Baggins'. Provides compatibility with Gollum 4.x. | +| --lenient-tag-lookup | none | Internal links resolve case-insensitively, will treat spaces as hyphens, and will match the first page found with a certain filename, anywhere in the repository. Provides compatibility with Gollum 4.x. | | --help | none | Display the list of options on the command line. | | --version | none | Display the current version of Gollum. | | --versions | none | Display the current version of Gollum and auxiliary gems. | diff --git a/bin/gollum b/bin/gollum index 762bb936..ad7a518e 100755 --- a/bin/gollum +++ b/bin/gollum @@ -152,10 +152,9 @@ MSG opts.on('--template-page', 'Use _Template in root as a template for new pages.') do wiki_options[:template_page] = true end - opts.on('--global-tag-lookup', 'Match an internal link to \'Foo\' with the first page found with that filename, anywhere in the repository. Provides compatibility with Gollum 4.x.') do + opts.on('--lenient-tag-lookup', 'Internal links resolve case-insensitively, will treat spaces as hyphens, and will match the first page found with a certain filename, anywhere in the repository. Provides compatibility with Gollum 4.x.') do + wiki_options[:case_insensitive_tag_lookup] = true wiki_options[:global_tag_lookup] = true - end - opts.on('--hyphened-tag-lookup', 'Match an internal link to \'Bilbo Baggins\' with \'Bilbo-Baggins\'. Provides compatibility with Gollum 4.x.') do wiki_options[:hyphened_tag_lookup] = true end opts.on('--emoji', 'Parse and interpret emoji tags (e.g. :heart:) except when the leading colon is backslashed (e.g. \\:heart:).') do