Skip to content

Commit

Permalink
Remove bogus processing of paragraphs starting with star
Browse files Browse the repository at this point in the history
This fixes #447.
  • Loading branch information
jnavila committed Dec 16, 2023
1 parent 66c7ddf commit 3d62d11
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 10 deletions.
6 changes: 0 additions & 6 deletions lib/Locale/Po4a/AsciiDoc.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1080,12 +1080,6 @@ sub parse {
$paragraph .= $line . "\n";
}

# paragraphs starting by a bullet, or numbered
# or paragraphs with a line containing many consecutive spaces
# (more than 3)
# are considered as verbatim paragraphs
$wrapped_mode = 0 if ( $paragraph =~ m/^(\*|[0-9]+[.)] )/s
or $paragraph =~ m/[ \t][ \t][ \t]/s );
( $line, $ref ) = $self->shiftline();
}
if ( length $paragraph ) {
Expand Down
3 changes: 3 additions & 0 deletions t/fmt/asciidoc/Lists.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,6 @@ After deciding the fate for all hunks, if there is any hunk that was chosen, the
* [x] Checked
* [X] Checked
* [*] Checked
1. *starting* with
a strong item
2 changes: 2 additions & 0 deletions t/fmt/asciidoc/Lists.norm
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,5 @@ After deciding the fate for all hunks, if there is any hunk that was chosen, the
* [x] Checked
* [X] Checked
* [*] Checked

1. *starting* with a strong item
7 changes: 6 additions & 1 deletion t/fmt/asciidoc/Lists.po
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,11 @@ msgid "Unchecked"
msgstr "UNCHECKED"

#. type: Plain text
#: Lists.adoc:248 Lists.adoc:249
#: Lists.adoc:248 Lists.adoc:249 Lists.adoc:250
msgid "Checked"
msgstr "CHECKED"

#. type: Plain text
#: Lists.adoc:252
msgid "*starting* with a strong item"
msgstr "*STARTING* WITH A STRONG ITEM"
7 changes: 6 additions & 1 deletion t/fmt/asciidoc/Lists.pot
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,11 @@ msgid "Unchecked"
msgstr ""

#. type: Plain text
#: Lists.adoc:248 Lists.adoc:249
#: Lists.adoc:248 Lists.adoc:249 Lists.adoc:250
msgid "Checked"
msgstr ""

#. type: Plain text
#: Lists.adoc:252
msgid "*starting* with a strong item"
msgstr ""
2 changes: 2 additions & 0 deletions t/fmt/asciidoc/Lists.trans
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,5 @@ AFTER DECIDING THE FATE FOR ALL HUNKS, IF THERE IS ANY HUNK THAT WAS CHOSEN, THE
* [x] CHECKED
* [X] CHECKED
* [*] CHECKED

1. *STARTING* WITH A STRONG ITEM
8 changes: 8 additions & 0 deletions t/fmt/asciidoc/Paragraphs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,11 @@ If --stdin was also used then this is prefixed by either "pack\t", or "keep\t" i
new .keep file was successfully created. This is useful to remove a
.keep file used as a lock to prevent the race with 'git repack'
mentioned above.
TIP: we're starting a
multi-line
Tip box.
TIP: *now bold*
text in
the beginning
4 changes: 4 additions & 0 deletions t/fmt/asciidoc/Paragraphs.norm
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ NOTE: This is my special note.
NOTE: What lovely war.

If --stdin was also used then this is prefixed by either "pack\t", or "keep\t" if a new .keep file was successfully created. This is useful to remove a .keep file used as a lock to prevent the race with 'git repack' mentioned above.

TIP: we're starting a multi-line Tip box.

TIP: *now bold* text in the beginning
12 changes: 11 additions & 1 deletion t/fmt/asciidoc/Paragraphs.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ msgid "What lovely war."
msgstr "WHAT LOVELY WAR."

#. type: Plain text
#: Paragraphs.adoc:61
#: Paragraphs.adoc:62
msgid "If --stdin was also used then this is prefixed by either \"pack\\t\", or \"keep\\t\" if a new .keep file was successfully created. This is useful to remove a .keep file used as a lock to prevent the race with 'git repack' mentioned above."
msgstr "IF --STDIN WAS ALSO USED THEN THIS IS PREFIXED BY EITHER \"PACK\\T\", OR \"KEEP\\T\" IF A NEW .KEEP FILE WAS SUCCESSFULLY CREATED. THIS IS USEFUL TO REMOVE A .KEEP FILE USED AS A LOCK TO PREVENT THE RACE WITH 'GIT REPACK' MENTIONED ABOVE."

#. type: Plain text
#: Paragraphs.adoc:66
msgid "we're starting a multi-line Tip box."
msgstr "WE'RE STARTING A MULTI-LINE TIP BOX."

#. type: Plain text
#: Paragraphs.adoc:69
msgid "*now bold* text in the beginning"
msgstr "*NOW BOLD* TEXT IN THE BEGINNING"
12 changes: 11 additions & 1 deletion t/fmt/asciidoc/Paragraphs.pot
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,20 @@ msgid "What lovely war."
msgstr ""

#. type: Plain text
#: Paragraphs.adoc:61
#: Paragraphs.adoc:62
msgid ""
"If --stdin was also used then this is prefixed by either \"pack\\t\", or "
"\"keep\\t\" if a new .keep file was successfully created. This is useful to "
"remove a .keep file used as a lock to prevent the race with 'git repack' "
"mentioned above."
msgstr ""

#. type: Plain text
#: Paragraphs.adoc:66
msgid "we're starting a multi-line Tip box."
msgstr ""

#. type: Plain text
#: Paragraphs.adoc:69
msgid "*now bold* text in the beginning"
msgstr ""
4 changes: 4 additions & 0 deletions t/fmt/asciidoc/Paragraphs.trans
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ NOTE: THIS IS MY SPECIAL NOTE.
NOTE: WHAT LOVELY WAR.

IF --STDIN WAS ALSO USED THEN THIS IS PREFIXED BY EITHER "PACK\T", OR "KEEP\T" IF A NEW .KEEP FILE WAS SUCCESSFULLY CREATED. THIS IS USEFUL TO REMOVE A .KEEP FILE USED AS A LOCK TO PREVENT THE RACE WITH 'GIT REPACK' MENTIONED ABOVE.

TIP: WE'RE STARTING A MULTI-LINE TIP BOX.

TIP: *NOW BOLD* TEXT IN THE BEGINNING

0 comments on commit 3d62d11

Please sign in to comment.