mirror of
https://git.zx2c4.com/cgit
synced 2024-11-24 17:38:41 +00:00
remove trailing whitespaces from source files
This commit is contained in:
parent
dcb16f0d11
commit
b431282c91
2
README
2
README
@ -95,5 +95,5 @@ Online presence
|
|||||||
* The cgit homepage is hosted by cgit at <http://git.zx2c4.com/cgit/about/>
|
* The cgit homepage is hosted by cgit at <http://git.zx2c4.com/cgit/about/>
|
||||||
|
|
||||||
* Patches, bug reports, discussions and support should go to the cgit
|
* Patches, bug reports, discussions and support should go to the cgit
|
||||||
mailing list: <cgit@lists.zx2c4.com>. To sign up, visit
|
mailing list: <cgit@lists.zx2c4.com>. To sign up, visit
|
||||||
<http://lists.zx2c4.com/mailman/listinfo/cgit>
|
<http://lists.zx2c4.com/mailman/listinfo/cgit>
|
||||||
|
@ -603,7 +603,7 @@ specification with the relevant string; available values are:
|
|||||||
This is called when the current filtering operation is
|
This is called when the current filtering operation is
|
||||||
completed. It must return an integer value. Usually 0
|
completed. It must return an integer value. Usually 0
|
||||||
indicates success.
|
indicates success.
|
||||||
|
|
||||||
Additionally, cgit exposes to the Lua the following built-in functions:
|
Additionally, cgit exposes to the Lua the following built-in functions:
|
||||||
|
|
||||||
'html(str)'::
|
'html(str)'::
|
||||||
|
2
filter.c
2
filter.c
@ -210,7 +210,7 @@ static inline int hook_lua_filter(lua_State *lua_state, void (*fn)(const char *t
|
|||||||
str = lua_tostring(lua_state, 1);
|
str = lua_tostring(lua_state, 1);
|
||||||
if (!str)
|
if (!str)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
save_filter_write = filter_write;
|
save_filter_write = filter_write;
|
||||||
save_filter = current_write_filter;
|
save_filter = current_write_filter;
|
||||||
unhook_write();
|
unhook_write();
|
||||||
|
@ -36,7 +36,7 @@ my $g_nested_brackets;
|
|||||||
$g_nested_brackets = qr{
|
$g_nested_brackets = qr{
|
||||||
(?> # Atomic matching
|
(?> # Atomic matching
|
||||||
[^\[\]]+ # Anything other than brackets
|
[^\[\]]+ # Anything other than brackets
|
||||||
|
|
|
|
||||||
\[
|
\[
|
||||||
(??{ $g_nested_brackets }) # Recursive set of nested brackets
|
(??{ $g_nested_brackets }) # Recursive set of nested brackets
|
||||||
\]
|
\]
|
||||||
@ -125,7 +125,7 @@ unless ($@) {
|
|||||||
my $ctx = shift;
|
my $ctx = shift;
|
||||||
my $raw = 0;
|
my $raw = 0;
|
||||||
if (defined $ctx) {
|
if (defined $ctx) {
|
||||||
my $output = $ctx->stash('markdown_output');
|
my $output = $ctx->stash('markdown_output');
|
||||||
if (defined $output && $output =~ m/^html/i) {
|
if (defined $output && $output =~ m/^html/i) {
|
||||||
$g_empty_element_suffix = ">";
|
$g_empty_element_suffix = ">";
|
||||||
$ctx->stash('markdown_output', '');
|
$ctx->stash('markdown_output', '');
|
||||||
@ -160,7 +160,7 @@ unless ($@) {
|
|||||||
my $text = shift;
|
my $text = shift;
|
||||||
my $ctx = shift;
|
my $ctx = shift;
|
||||||
if (defined $ctx) {
|
if (defined $ctx) {
|
||||||
my $output = $ctx->stash('markdown_output');
|
my $output = $ctx->stash('markdown_output');
|
||||||
if (defined $output && $output eq 'html') {
|
if (defined $output && $output eq 'html') {
|
||||||
$g_empty_element_suffix = ">";
|
$g_empty_element_suffix = ">";
|
||||||
}
|
}
|
||||||
@ -647,7 +647,7 @@ sub _HashHTMLBlocks {
|
|||||||
"\n\n" . $key . "\n\n";
|
"\n\n" . $key . "\n\n";
|
||||||
}egmx;
|
}egmx;
|
||||||
# Special case just for <hr />. It was easier to make a special case than
|
# Special case just for <hr />. It was easier to make a special case than
|
||||||
# to make the other regex more complicated.
|
# to make the other regex more complicated.
|
||||||
$text =~ s{
|
$text =~ s{
|
||||||
(?:
|
(?:
|
||||||
(?<=\n\n) # Starting after a blank line
|
(?<=\n\n) # Starting after a blank line
|
||||||
@ -658,7 +658,7 @@ sub _HashHTMLBlocks {
|
|||||||
[ ]{0,$less_than_tab}
|
[ ]{0,$less_than_tab}
|
||||||
<(hr) # start tag = $2
|
<(hr) # start tag = $2
|
||||||
\b # word break
|
\b # word break
|
||||||
([^<>])*? #
|
([^<>])*? #
|
||||||
/?> # the matching end tag
|
/?> # the matching end tag
|
||||||
[ \t]*
|
[ \t]*
|
||||||
(?=\n{2,}|\Z) # followed by a blank line or end of document
|
(?=\n{2,}|\Z) # followed by a blank line or end of document
|
||||||
@ -998,7 +998,7 @@ sub _DoHeaders {
|
|||||||
# Setext-style headers:
|
# Setext-style headers:
|
||||||
# Header 1
|
# Header 1
|
||||||
# ========
|
# ========
|
||||||
#
|
#
|
||||||
# Header 2
|
# Header 2
|
||||||
# --------
|
# --------
|
||||||
#
|
#
|
||||||
@ -1193,7 +1193,7 @@ sub _ProcessListItems {
|
|||||||
sub _DoCodeBlocks {
|
sub _DoCodeBlocks {
|
||||||
#
|
#
|
||||||
# Process Markdown `<pre><code>` blocks.
|
# Process Markdown `<pre><code>` blocks.
|
||||||
#
|
#
|
||||||
|
|
||||||
my $text = shift;
|
my $text = shift;
|
||||||
|
|
||||||
@ -1227,26 +1227,26 @@ sub _DoCodeBlocks {
|
|||||||
sub _DoCodeSpans {
|
sub _DoCodeSpans {
|
||||||
#
|
#
|
||||||
# * Backtick quotes are used for <code></code> spans.
|
# * Backtick quotes are used for <code></code> spans.
|
||||||
#
|
#
|
||||||
# * You can use multiple backticks as the delimiters if you want to
|
# * You can use multiple backticks as the delimiters if you want to
|
||||||
# include literal backticks in the code span. So, this input:
|
# include literal backticks in the code span. So, this input:
|
||||||
#
|
#
|
||||||
# Just type ``foo `bar` baz`` at the prompt.
|
# Just type ``foo `bar` baz`` at the prompt.
|
||||||
#
|
#
|
||||||
# Will translate to:
|
# Will translate to:
|
||||||
#
|
#
|
||||||
# <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
|
# <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
|
||||||
#
|
#
|
||||||
# There's no arbitrary limit to the number of backticks you
|
# There's no arbitrary limit to the number of backticks you
|
||||||
# can use as delimters. If you need three consecutive backticks
|
# can use as delimters. If you need three consecutive backticks
|
||||||
# in your code, use four for delimiters, etc.
|
# in your code, use four for delimiters, etc.
|
||||||
#
|
#
|
||||||
# * You can use spaces to get literal backticks at the edges:
|
# * You can use spaces to get literal backticks at the edges:
|
||||||
#
|
#
|
||||||
# ... type `` `bar` `` ...
|
# ... type `` `bar` `` ...
|
||||||
#
|
#
|
||||||
# Turns to:
|
# Turns to:
|
||||||
#
|
#
|
||||||
# ... type <code>`bar`</code> ...
|
# ... type <code>`bar`</code> ...
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -1287,7 +1287,7 @@ sub _EncodeCode {
|
|||||||
{
|
{
|
||||||
no warnings 'once';
|
no warnings 'once';
|
||||||
if (defined($blosxom::version)) {
|
if (defined($blosxom::version)) {
|
||||||
s/\$/$/g;
|
s/\$/$/g;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1693,8 +1693,8 @@ See the readme file for detailed release notes for this version.
|
|||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
=head1 COPYRIGHT AND LICENSE
|
||||||
|
|
||||||
Copyright (c) 2003-2004 John Gruber
|
Copyright (c) 2003-2004 John Gruber
|
||||||
<http://daringfireball.net/>
|
<http://daringfireball.net/>
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -54,7 +54,7 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
|
|||||||
|
|
||||||
if (get_sha1(ref, sha1))
|
if (get_sha1(ref, sha1))
|
||||||
return 0;
|
return 0;
|
||||||
if (sha1_object_info(sha1, &size) != OBJ_COMMIT)
|
if (sha1_object_info(sha1, &size) != OBJ_COMMIT)
|
||||||
return 0;
|
return 0;
|
||||||
read_tree_recursive(lookup_commit_reference(sha1)->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
|
read_tree_recursive(lookup_commit_reference(sha1)->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
|
||||||
return walk_tree_ctx.found_path;
|
return walk_tree_ctx.found_path;
|
||||||
|
@ -112,7 +112,7 @@ static char* append_readme_path(const char *filename, const char *ref, const cha
|
|||||||
full_path = xstrdup(path);
|
full_path = xstrdup(path);
|
||||||
} else
|
} else
|
||||||
full_path = fmtalloc("%s/%s", base_dir, path);
|
full_path = fmtalloc("%s/%s", base_dir, path);
|
||||||
|
|
||||||
if (!ref) {
|
if (!ref) {
|
||||||
resolved_base = realpath(base_dir, NULL);
|
resolved_base = realpath(base_dir, NULL);
|
||||||
resolved_full = realpath(full_path, NULL);
|
resolved_full = realpath(full_path, NULL);
|
||||||
@ -136,7 +136,7 @@ void cgit_print_repo_readme(char *path)
|
|||||||
|
|
||||||
if (ctx.repo->readme.nr == 0)
|
if (ctx.repo->readme.nr == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
filename = ctx.repo->readme.items[0].string;
|
filename = ctx.repo->readme.items[0].string;
|
||||||
ref = ctx.repo->readme.items[0].util;
|
ref = ctx.repo->readme.items[0].util;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user