[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lynx-dev] -xhtml-parsing vs -xhtml_parsing
From: |
Larry Hynes |
Subject: |
Re: [Lynx-dev] -xhtml-parsing vs -xhtml_parsing |
Date: |
Fri, 21 Apr 2017 15:08:07 +0100 |
Thomas Dickey <address@hidden> wrote:
> On Thu, Apr 20, 2017 at 11:11:06PM +0100, Larry Hynes wrote:
> > Hi
> >
> > (Lynx 2.8.9dev.11)
> >
> > As per `man lynx`, -xhtml_parsing should work:
> >
> > -xhtml_parsing
> > tells Lynx that it can ignore certain tags which
> > have no content in an XHTML 1.0 document. For
> > example "<p/>" will be discarded.
> >
> > $ lynx -xhtml_parsing http://lynx.invisible-island.net/current/
> > lynx: Invalid Option: -xhtml_parsing
> > USAGE: lynx [options] [file]
> > Options are:
> > ...
> > ...
> > -xhtml-parsing enable XHTML 1.0 parsing (off)
> >
> > I imagine that it would be 'better' to get -xhtml_parsing working
> > correctly, rather than simply amend man page to include -xhtml-parsing,
> > as all(?) other options seem to be -foo_bar, not -baz-qux. That
> > said, however, -xhtml-parsing seems to date from 2008-09-21
> > (2.8.7dev.10) (in CHANGES), so perhaps the intention is to use
> > hyphen, not underscore?
>
> iirc, lynx accepts either "-" or "_" in options...
>
> man lynx
>
> Lynx uses only long option names. Option names can begin with double
> dash as well, underscores and dashes can be intermixed in option names
> (in the reference below options are with one dash before them and with
> underscores).
>
> though perhaps that relies on the table having "_", and just
> treating "-" as an alternative (something to check)
Following diff seems to fix it. (Moral of the story: use "_" in table.)
--- src/LYMain.c 2017-04-21 15:06:35.000000000 +0100
+++ LYMain2.c 2017-04-21 15:07:11.000000000 +0100
@@ -4039,7 +4039,7 @@
),
#endif
PARSE_SET(
- "xhtml-parsing", 4|SET_ARG, LYxhtml_parsing,
+ "xhtml_parsing", 4|SET_ARG, LYxhtml_parsing,
"enable XHTML 1.0 parsing"
),
PARSE_NIL