-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enforce language url subsitution on path boundary #254
enforce language url subsitution on path boundary #254
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
layouts/partials/templates/schema_json.html
@oasys Nice Catch ! What if we use like -{{- $lang_url := replace $url ( printf "%s/" .Lang) "/" }}
+{{- $lang_url := replace $url ( printf "%s/" .Lang) "/" 1 }} |
I will test later, but I suspect that will only fix when running a multi language config. A single language config will probably still have problems (as in my example, there will be no |
True |
a52d740
to
a52ae2f
Compare
How about this? I assume multilingual config always has the lang prefix at the beginning of the URI. Using
|
This will do the same, but might be more readable:
If you prefer this change instead of the |
I agree, sure we can do this way |
Without this, the section name gets mangled when the language was a substring of the section. For example, under 'en', a section named "fragment" changes to "fragmt".
a52ae2f
to
8a1270e
Compare
Kudos, SonarCloud Quality Gate passed!
|
Done. Thanks! |
…ityatelange#254) * Without this, the section name gets mangled when the language was a sub-string of the section. For example, under 'en', a section named "fragment" changes to "fragmt".
Without this, the section name gets mangled when the language was a
substring of the section. For example, under 'en', a section named
"fragment" changes to "fragmt".