Skip to content

Commit

Permalink
Revert "Merge pull request #71 from freeformsystems/master"
Browse files Browse the repository at this point in the history
This reverts commit e7df1f0, reversing
changes made to c3fd67e.

Commit was introduce as a aesthetic change when using `-Kutf8 -Tutf8`.

Quoting from the issue that led to the PR:

> This may seem a little strange, it's more aesthetic then anything
> else. When troff is run with -Kutf8 -Tutf8 to ensure that utf8
> characters appear correctly then the bullets generated by \(bu appear as
> small squares (I'm using 13pt Pragmata Pro).

However, in `bundler` we're not using `-Tutf8`, but `-Tascii`, and this
results in weird characters for list items as reported [here](cli-kit/cli-command#78).

Since this change never made it into any `ronn` release, I think
reverting it could encourage adoption of `ronn-ng` as a drop-in
replacement of `ronn`. At least for us :)
  • Loading branch information
deivid-rodriguez committed Jul 15, 2020
1 parent 2bb3c22 commit bfb1f5d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions lib/ronn/roff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def block_filter(node)
when 'ol'
macro 'IP', %W["#{node.parent.children.index(node) + 1}." 4]
when 'ul'
macro 'IP', ['"\\[ci]"', '4']
macro 'IP', ['"\(bu"', '4']
else
raise "List element found as a child of non-list parent element: #{node.inspect}"
end
Expand Down Expand Up @@ -316,7 +316,7 @@ def macro(name, value = nil)
end

HTML_ROFF_ENTITIES = {
'•' => '\[ci]',
'•' => '\(bu',
'&lt;' => '<',
'&gt;' => '>',
' ' => '\~', # That's a literal non-breaking space character there
Expand Down
24 changes: 12 additions & 12 deletions test/entity_encoding_test.roff
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@ Your output <i>might</i> look like this:
.IP "" 0
.P
Here\'s some special entities:
.IP "\[ci]" 4
&bull; \[ci]
.IP "\[ci]" 4
.IP "\(bu" 4
&bull; \(bu
.IP "\(bu" 4
&nbsp; \~
.IP "\[ci]" 4
.IP "\(bu" 4
&copy; \(co
.IP "\[ci]" 4
.IP "\(bu" 4
&rdquo; \(rs
.IP "\[ci]" 4
.IP "\(bu" 4
&mdash; \(em
.IP "\[ci]" 4
.IP "\(bu" 4
&reg; \(rg
.IP "\[ci]" 4
.IP "\(bu" 4
&sect; \(sc
.IP "\[ci]" 4
.IP "\(bu" 4
&ge; \(>=
.IP "\[ci]" 4
.IP "\(bu" 4
&le; \(<=
.IP "\[ci]" 4
.IP "\(bu" 4
&ne; \(!=
.IP "\[ci]" 4
.IP "\(bu" 4
&equiv; \(==
.IP "" 0
.P
Expand Down
16 changes: 8 additions & 8 deletions test/markdown_syntax.roff
Original file line number Diff line number Diff line change
Expand Up @@ -553,15 +553,15 @@ Then, anywhere in the document, you define your link label like this, on a line
.IP "" 0
.P
That is:
.IP "\[ci]" 4
.IP "\(bu" 4
Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces);
.IP "\[ci]" 4
.IP "\(bu" 4
followed by a colon;
.IP "\[ci]" 4
.IP "\(bu" 4
followed by one or more spaces (or tabs);
.IP "\[ci]" 4
.IP "\(bu" 4
followed by the URL for the link;
.IP "\[ci]" 4
.IP "\(bu" 4
optionally followed by a title attribute for the link, enclosed in double or single quotes, or enclosed in parentheses\.
.IP "" 0
.P
Expand Down Expand Up @@ -813,11 +813,11 @@ Inline image syntax looks like this:
.IP "" 0
.P
That is:
.IP "\[ci]" 4
.IP "\(bu" 4
An exclamation mark: \fB!\fR;
.IP "\[ci]" 4
.IP "\(bu" 4
followed by a set of square brackets, containing the \fBalt\fR attribute text for the image;
.IP "\[ci]" 4
.IP "\(bu" 4
followed by a set of parentheses, containing the URL or path to the image, and an optional \fBtitle\fR attribute enclosed in double or single quotes\.
.IP "" 0
.P
Expand Down
6 changes: 3 additions & 3 deletions test/nested_list_with_code.roff
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.TH "NESTED_LIST_WITH_CODE" "" "January 1979" ""
.IP "\[ci]" 4
.IP "\(bu" 4
\fBtoggle_status\fR
.IP "\[ci]" 4
.IP "\(bu" 4
Toggle the display of the status bar\.
.IP "" 0

.IP "\[ci]" 4
.IP "\(bu" 4
\fBspawn <executable> <additional args>\fR TODO explain path\-alike expansion
.IP "" 0

0 comments on commit bfb1f5d

Please sign in to comment.