Commit graph

11778 commits

Author SHA1 Message Date
Alexander Krotov
509d2ea525 Simplify Text.Pandoc.Pretty.offset 2018-10-23 13:35:49 +03:00
Alexander Krotov
ec2d86e34f Muse writer: use length instead of realLength to calculate definition indentation
Muse parsers don't take character width into account when calculating indentation.
2018-10-23 13:35:49 +03:00
John MacFarlane
a7819c6440 Man reader: allow any nonspace char for macro name. 2018-10-23 00:49:57 -07:00
John MacFarlane
c6590b193d Man reader: handle \fS as a no-op.
This changes font, but to what?  Can't find in documentation.
2018-10-23 00:18:41 -07:00
John MacFarlane
8b82667f8a Man reader: allow lowercase b,i etc. for font commands.
These seem to work.
2018-10-23 00:07:39 -07:00
John MacFarlane
bda1c0da81 Man reader: Handle optional argument in ME, UE macros.
Closes #4995.
2018-10-22 23:56:02 -07:00
John MacFarlane
261cbad0ef Groff writers escaping changes.
- Improve escaping of accented characters with `--ascii`.
  Combining accents are now handled properly.
- Don't escape spaces and tabs in code blocks. This doesn't
  seem to be necessary.
2018-10-22 23:48:12 -07:00
John MacFarlane
8b204dda77 T.P.Writers.Groff - don't export escapeChar. 2018-10-22 23:48:12 -07:00
Brian Leung
7eea5c62ed LaTeX reader: add support for nolinkurl command. (#4992) 2018-10-22 23:36:44 -07:00
Nick Fleisher
19e0fcb68b Add viz. to abbreviations file (#5007) 2018-10-22 18:45:46 -07:00
Alexander Krotov
4275d58a9f Muse writer: do not insert newline before lists 2018-10-23 03:38:59 +03:00
Alexander Krotov
1d3460c0b0 Muse writer: code cleanup 2018-10-23 03:38:59 +03:00
John MacFarlane
0c7ac0c862 GroffChar: Proper combining characters for combining accents. 2018-10-22 16:02:04 -07:00
John MacFarlane
87fa837569 Man reader: improved combining accents.
We now handle e.g. `\[A ho]`.
2018-10-22 15:49:54 -07:00
John MacFarlane
0327226d4c Man reader: don't parse \[ul] as unicode escape. 2018-10-22 12:05:34 -07:00
John MacFarlane
7a111d2d33 Man reader: Support .EX/.EE macros. 2018-10-22 11:16:00 -07:00
John MacFarlane
44b1cd620d Man reader: support .TQ macro. 2018-10-22 11:13:35 -07:00
John MacFarlane
22078a8690 Man reader: handle \~ for nonbreaking space. 2018-10-22 11:06:27 -07:00
John MacFarlane
70d2a1d9c1 Man reader: Hlint. 2018-10-22 11:03:14 -07:00
John MacFarlane
785fad7091 Man reader: fix source position output with --verbose.
We now encode SourcePos in the MMacro token.

Closes #5001.
2018-10-22 10:51:17 -07:00
John MacFarlane
8f97c8e458 Man reader: fixed spurious newlines in code blocks.
These were caused by lines that just changed to typewriter font.
The lexer has been adjusted so these no longer show up as blank
lines.

Closes #5005.
2018-10-22 10:42:47 -07:00
Yoan Blanc
9608fd0c4a revealjs: typo in the socket.io javascript plugin (#5006) 2018-10-22 10:40:49 -07:00
Alexander Krotov
89bcd192a1 Muse reader internals: remove unnecessary "skipSpaces" 2018-10-22 15:56:23 +03:00
leungbk
a22e044b13 Add enclosedByPair1 and change relevant invocations. 2018-10-22 13:19:39 +02:00
leungbk
cba508c54b Add space after brace. 2018-10-22 13:19:39 +02:00
Alexander Krotov
673734b589 Reduce code duplication in Muse writer 2018-10-22 12:35:29 +03:00
John MacFarlane
4625150f4c Man reader: fix code block tests.
They incorporated a spurious newline which needs to be
removed.
2018-10-21 23:01:58 -07:00
John MacFarlane
07a0835824 Man reader: Fix spacing requirement for macro arguments.
This is allowed:

    .BR "hello"x"hello".
2018-10-21 22:53:57 -07:00
John MacFarlane
8448eb3b69 Man reader: .IP can also be used for list continuations. 2018-10-21 22:20:47 -07:00
John MacFarlane
382763a7db Man reader: support .ds, .ds1; also fix macro arguments.
Closes #4997.
2018-10-21 22:00:50 -07:00
John MacFarlane
00f1f4a220 Man reader: add predefined strings (e.g. \*[R]). 2018-10-21 21:27:05 -07:00
John MacFarlane
8523662f2f Man reader: Remove handling of .HF. 2018-10-21 21:13:09 -07:00
John MacFarlane
8c97e9f071 Man reader: clarify comment. 2018-10-21 21:08:15 -07:00
John MacFarlane
15fa5455e2 Man reader: support .SY, .OP macros.
Closes #4994.
2018-10-21 21:06:46 -07:00
Alexander Krotov
fe99001d9f hlint Muse writer 2018-10-22 03:14:45 +03:00
Alexander Krotov
875e33ecf6 Muse reader: allow footnotes to start with empty line
A space character was required after footnote marker, now newline is allowed.
2018-10-22 03:05:17 +03:00
John MacFarlane
95b9d94092 Man reader: improved escaping code.
We're now set up to handle user string substitutions `\*(xy` better.

The present approach has some inefficient list concatenation,
but we can fix that later.
2018-10-21 16:18:30 -07:00
John MacFarlane
1561bf2ecb Man reader: slightly improved handling of \* escapes. 2018-10-21 15:10:37 -07:00
John MacFarlane
3fa9a838c0 Man reader: Support .so for include files.
Closes #4986.
2018-10-21 13:10:42 -07:00
John MacFarlane
0ac43ab2a8 Man reader: moved all lexer functions to the front. 2018-10-21 12:57:57 -07:00
John MacFarlane
6b553c2e22 Man reader: Moved handling of P, PP, LP to parser phase. 2018-10-21 12:53:26 -07:00
John MacFarlane
f3a71d723b Man reader: added type synonym for Arg. 2018-10-21 12:48:14 -07:00
John MacFarlane
1238a57456 Man reader: Moved handling of B, I, BI, IB, etc. to parsing phase.
Ultimately groff lexing should not handle man-specific macros.
This approach also gives more correct results for the test case.
2018-10-21 12:43:44 -07:00
John MacFarlane
e388dddefa Man reader: Clean up inline parsing. 2018-10-21 12:18:53 -07:00
John MacFarlane
25248c7a37 Man reader: move macro resolution to lexer phase.
We also introduce a new type ManTokens (a sequence of tokens)
and remove MComment.  This allows lexers to return empty strings
of tokens, or multiple tokens (as when macros are resolved).

One test still fails.  This needs to be fixed by moving handling
of .BI, .I, etc. to the parsing phase.
2018-10-21 12:08:54 -07:00
Alexander Krotov
a98e2b7c42 Muse writer: use lightweight markup after </em> tag 2018-10-21 20:23:10 +03:00
John MacFarlane
3ec0b78343 Man reader: allow unescaped " in plain arguments. 2018-10-20 22:59:30 -07:00
John MacFarlane
9593b375d7 Man reader: support UR/UE, MT/ME for links.
Closes #4989.
2018-10-20 22:55:20 -07:00
John MacFarlane
2b7a541dd0 Man reader: Fixed handling of nested fonts.
Closes #4978.
2018-10-20 22:41:39 -07:00
Alexander Krotov
78bec0837d Muse reader: make sure that the whole text is parsed 2018-10-21 06:42:17 +03:00