Alexander Krotov
82a0ceaf18
Muse reader: fix directive parsing
...
This fixes bugs introduced in commit 4bfab8f04c
.
2018-02-15 18:17:24 +03:00
Alexander Krotov
42e39fbd26
Muse reader: parse definition lists with multiple descriptions
2018-02-13 14:34:45 +03:00
Alexander Krotov
8aed3652c2
Muse reader: refactor to avoid reparsing
...
Lists are parsed in linear instead of exponential time now.
Contents of block tags, such as <quote>, is parsed directly,
without storing it in a string and parsing with parseFromString.
Fixed a bug: headers did not terminate lists.
2018-02-12 17:30:57 +03:00
Alexander Krotov
3480a8acc2
Muse reader: paragraph indentation does not indicate nested quote
...
Muse allows indentation to indicate quotation or alignment,
but only on the top level, not within a <quote> or list.
This patch also simplifies the code by removing museInQuote
and museInList fields from the state structure.
Headers and indented paragraphs are attempted to be parsed
only at the topmost level, instead of aborting parsing with guards.
2018-02-12 04:57:56 +03:00
Alexander Krotov
450a200637
Muse reader: test empty quote tag
2018-02-11 19:45:16 +03:00
Alexander Krotov
1dfda7e204
Muse reader: require that block tags are on separate lines
...
Text::Amuse already explicitly requires it anyway.
Supporting block tags on the same line as contents makes
it hard to combine closing tag parsers with indentation parsers.
Being able to combine parsers is required for no-reparsing refactoring
of Muse reader.
2018-02-11 19:35:58 +03:00
Alexander Krotov
6c45f8c8f6
Muse reader: test that two blank lines after verse can separate list items
...
Unlike paragraph and <quote> tag parsers, verse parser consumes newline.
For this reason only three or more blank lines can separate list items.
2018-02-05 01:39:38 +03:00
Alexander Krotov
3b667c54ea
Muse reader: test that lists can be separated with two blanklines after blockquote
...
Existing tests only checked this for paragraphs.
2018-02-05 00:25:31 +03:00
Alexander Krotov
248f6076bc
Muse reader: fix parsing of trailing whitespace
...
Newline after whitespace now results in softbreak
instead of space.
2018-01-28 03:18:29 +03:00
Alexander Krotov
6337539e32
Muse reader: fix matching of closing inline tags
2018-01-24 14:16:56 +03:00
Alexander Krotov
98f0e2053e
Muse reader: remove multiple descriptions during round-trip tests
2018-01-20 18:34:42 +03:00
Alexander Krotov
e1cc9d9abc
Muse reader: enable definition lists in round-trip test
2018-01-20 14:09:44 +03:00
John MacFarlane
b8ffd834cf
hlint code improvements.
2018-01-19 21:25:24 -08:00
Alexander Krotov
22b69b557e
Muse reader: fix parsing of nested definition lists
2018-01-20 02:14:27 +03:00
Alexander Krotov
7680e9b964
Muse reader: require only one space for nested definition list indentation
2018-01-19 14:16:20 +03:00
Alexander Krotov
19d2576223
Muse reader: parse definition list terms without parseFromString
2018-01-19 01:50:17 +03:00
Alexander Krotov
a516198d47
Muse reader: fix parsing of code at the beginning of paragraph
2018-01-18 15:35:43 +03:00
Alexander Krotov
5f57094a47
Muse reader: refactor definition list parsing
...
Test with wrong indentation is removed,
because now it is parsed as nested lists.
Emacs Muse and Text::Amuse don't have the same
behavior anyway.
2018-01-18 14:55:07 +03:00
Alexander Krotov
9986ccb333
Muse reader: parse "~~" as non-breaking space in Text::Amuse mode
...
Latest Text::Amuse supports "~~"
2018-01-18 02:46:02 +03:00
Alexander Krotov
ab85143e8a
Muse reader: refactor list parsing
...
Now list item contents is parsed as blocks,
without resorting to parseFromString.
Only the first line of paragraph has to
be indented now, just like in Emacs Muse
and Text::Amuse.
Definition lists are not refactored yet.
See also: issue #3865 .
2018-01-18 02:17:26 +03:00
Alexander Krotov
551aec7b01
Muse reader: enable round trip test
...
Closes #4107
2017-12-30 20:32:16 +03:00
Alexander Krotov
0405c5b461
Muse reader: parse anchors immediately after headings as IDs
2017-12-21 15:52:10 +03:00
Alexander Krotov
b5e62a5c09
Muse reader: require that note references does not start with 0
2017-12-20 14:00:30 +03:00
Alexander Krotov
f6abf15832
Muse reader: parse empty comments correctly
2017-12-19 04:23:32 +03:00
Alexander Krotov
e536c4d9c9
hlint Muse reader and tests
2017-12-06 19:38:25 +03:00
Alexander Krotov
6fd3cdac46
Muse reader: add test for #disable-tables directive in Emacs mode
2017-12-06 19:35:01 +03:00
Alexander Krotov
3ae359721d
Muse reader: don't allow emphasis to be preceded by letter
2017-12-06 19:04:35 +03:00
Alexander Krotov
ed261e5832
Muse reader: add underline support in Emacs Muse mode
2017-12-04 15:59:26 +03:00
Alexander Krotov
7751391fce
Muse reader: correctly remove indentation from notes
...
Exactly one space is required and considered to be part of the marker.
2017-11-29 05:12:25 +03:00
John MacFarlane
5a225aa603
Temporarily disable round-trip block test for muse reader.
...
See #4107 .
2017-11-28 16:13:01 -08:00
Alexander Krotov
c2993a6fc6
Muse reader: parse "~~" as non-breaking space in Emacs mode
2017-11-27 12:25:06 +03:00
Alexander Krotov
00004f042c
Muse reader: make code blocks round trip
2017-11-27 04:54:23 +03:00
Alexander Krotov
bdad8c1d69
Muse reader: drop common space prefix from list items
2017-11-26 22:14:18 +03:00
Alexander Krotov
a8ac673285
Muse reader: Add partial round trip test
2017-11-26 02:01:39 +03:00
Alexander Krotov
ea2ea455b3
Muse reader: don't interpret XML entities
2017-11-25 22:46:25 +03:00
Alexander Krotov
77af25b4c3
Muse reader: parse markup in definition list terms
2017-11-24 14:02:43 +03:00
Alexander Krotov
137c7c2a65
Muse reader: allow definition to end with EOF
2017-11-24 13:16:09 +03:00
Alexander Krotov
0cfd764d27
Muse: move inline list normalization to writer
2017-11-24 12:17:20 +03:00
Alexander Krotov
75e2a1104c
Muse reader: allow list items to be empty
2017-11-22 18:49:07 +03:00
Alexander Krotov
0b63ac2db1
Muse reader: add ordered list test
2017-11-22 18:48:45 +03:00
Alexander Krotov
c8ab4789b6
Muse reader: add more multiline definition tests
2017-11-22 15:23:09 +03:00
Alexander Krotov
351765d4ad
Muse reader: concatenate inlines of the same type
2017-11-22 01:22:43 +03:00
Alexander Krotov
df3a80cc97
Muse writer: escape only </code> inside code tag
...
Additional <verbatim> is not needed as <code> is verbatim already.
2017-11-22 01:22:43 +03:00
Alexander Krotov
6c17117ef2
Muse reader: add inline <literal> support
2017-11-21 19:53:55 +03:00
Alexander Krotov
59f537c31f
Muse reader: test <literal> blocks
2017-11-21 19:01:53 +03:00
Alexander Krotov
82bcda80c6
Muse reader: count only one space as part of list item marker
2017-11-19 04:40:00 +03:00
Alexander Krotov
163af3fdee
Muse reader: produce SoftBreaks on newlines
...
Now wrapping can be preserved with --wrap=preserve
2017-11-19 02:37:52 +03:00
Alexander Krotov
6018a2324d
Muse reader: Add Text::Amuse footnote extensions
...
Footnote end is indicated by indentation,
so footnotes can be placed anywhere in the text,
not just at the end of it.
2017-11-18 23:43:02 +03:00
Alexander Krotov
3a83b3843d
Replace "emacs" extension with "amuse" extension
...
It makes clear that extension is related to Muse markup.
2017-11-13 18:41:49 +03:00
Alexander Krotov
df4cb20f29
Muse reader: accept Emacs Muse definition lists
...
Emacs Muse does not require indentation.
2017-11-12 18:08:41 +03:00