Miek Gieben
560804f06c
Merge pull request #51 from mmarkdown/include-head-bytes
...
html: Allow additional head bytes to be injected
2018-08-12 21:22:11 +01:00
Miek Gieben
0b8349a632
Merge pull request #52 from mmarkdown/include2
...
parser: remove logic to keep cwd
2018-08-12 21:21:58 +01:00
Miek Gieben
3d381cc496
parser: remove logic to keep cwd
...
This removes the logic for CWD tracking and leaves it up to the user
of the library to do this themselves.
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-11 11:14:48 +01:00
Miek Gieben
f2d8c9a57d
html: Allow additional head bytes to be injected
...
Allows one to add more head tags, mostly scripts usually, to be included
in the <HEAD> section of the generated HTML. This keeps the doc self
contained.
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-11 11:04:43 +01:00
Krzysztof Kowalczyk
83813889a6
maybe stop codecov complaining about not enough coverage
2018-08-10 14:43:34 -07:00
Miek Gieben
dfd1eb5426
Merge pull request #48 from mmarkdown/callouts
...
Add callout parsing
2018-08-10 22:34:22 +01:00
Krzysztof Kowalczyk
9f2eaaf716
maybe fix building PRs in travis
2018-08-10 14:29:04 -07:00
Miek Gieben
9f9e0e833b
correct import
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-10 22:23:04 +01:00
Miek Gieben
45707013cb
Add callout parsing
...
Add ast.Callout node that is detected in test and extra utils to parse
it in codeblock.
See https://mmark.nl/post/syntax/#callouts for what they are.
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-10 22:03:41 +01:00
Miek Gieben
d7aac2d895
Merge pull request #47 from mmarkdown/caption-quote
...
Add quote block even without caption
2018-08-09 19:39:06 +01:00
Miek Gieben
0d628773de
Add quote block even without caption
...
This is the same fix as for #40 , but for quote block.
Add bare quote test to testdata/mmark.test as well for this.
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-09 16:57:32 +01:00
Miek Gieben
8d3d356b04
Merge pull request #46 from mmarkdown/code-include
...
Code include
2018-08-08 21:25:02 +01:00
Miek Gieben
a2492adee6
Call correct method in the test
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-08 21:19:26 +01:00
Miek Gieben
637a45dd3f
Add codeinclude test
...
Add test for code include <{{..}}. And Fix off-by-one error if we
process a code include.
Also set the language if we have a code include.
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-08 21:12:21 +01:00
Miek Gieben
0ba528595b
Merge branch 'master' of github.com:gomarkdown/markdown into code-include
2018-08-08 21:08:29 +01:00
Miek Gieben
8f3c480f3e
Fix code include
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-08 21:08:25 +01:00
Miek Gieben
12d7bbfc62
Merge pull request #45 from mmarkdown/include-tests
...
Fix include testing
2018-08-08 20:51:06 +01:00
Miek Gieben
001fb50675
Fix include testing
...
Make the test table driven and fix bugs uncovered by the new test.
Mainly in the area of parsing the optional address specification between
block quotes.
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-08 20:17:13 +01:00
Miek Gieben
67424e3cca
Merge pull request #44 from mmarkdown/include-off-by-one
...
Fix off-by-one error in include parsing
2018-08-07 22:56:53 +01:00
Miek Gieben
f843493451
Fix off-by-one error in include parsing
...
Of course, this happened. Fix off-by-one
Caught by mmark testing
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-07 22:32:07 +01:00
Miek Gieben
c67f36651c
Merge pull request #43 from mmarkdown/include-address
...
Fix include's address specification
2018-08-07 21:25:42 +01:00
Miek Gieben
074b4fa373
Fix include's address specification
...
Fixes #10
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-07 20:46:42 +01:00
Miek Gieben
01a56b20f8
Merge pull request #42 from mmarkdown/align-string
...
Make a String() function for AlignmentFlags
2018-08-07 07:54:34 +01:00
Miek Gieben
543ba837f9
Make a String() function for AlignmentFlags
...
Implement the TODO and a method `String()` that returns a string for
AlignmentFlags.
Pondered doing the same for Matters and CitationTypes, but those are
more renderer dependent (and not standard).
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-07 07:43:02 +01:00
Miek Gieben
3b95c4fb8e
Merge pull request #41 from mmarkdown/classes
...
Fix how classes are returned in block level attributes
2018-08-06 23:48:10 +01:00
Miek Gieben
31666d246c
Add test
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-06 23:32:08 +01:00
Miek Gieben
7e6b680d17
Fix how classes are returned in block level attributes
...
Also export it, so it can be used directly in mmark/xml/renderer.go (I
had the exact copy of this code there)
Fixes #27
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-06 23:03:09 +01:00
Miek Gieben
73dfd3c13e
Merge pull request #40 from mmarkdown/mmark-add-block
...
Add block for Mmark
2018-08-06 20:45:42 +01:00
Miek Gieben
11c226f8ae
Add block for Mmark
...
If the mmark extension is set and there is no caption we should still
add the block to the AST.
Caught by mmark testing.
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-06 20:35:47 +01:00
Miek Gieben
566d53aee4
Merge pull request #39 from mmarkdown/export-inline
...
Export parser.Inline
2018-08-05 20:44:07 +01:00
Krzysztof Kowalczyk
7462de8d99
tweak comment
2018-08-05 11:37:51 -07:00
Krzysztof Kowalczyk
de14329a8f
remove unused function
2018-08-05 11:34:53 -07:00
Miek Gieben
97814d992e
Export parser.Inline
...
Make this public so other renderers/parser can call p.Inline.
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-05 18:25:27 +01:00
Miek Gieben
f4c71355db
Merge pull request #34 from mmarkdown/include-hook
...
Support includes
2018-08-04 08:45:47 +01:00
Miek Gieben
db4c2c1320
Merge pull request #33 from mmarkdown/citations
...
Citations
2018-08-03 19:14:36 +01:00
Miek Gieben
a159f9c632
Naming and tests
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 19:13:12 +01:00
Miek Gieben
e03a31182e
PR comments; naming
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 19:12:22 +01:00
Miek Gieben
f58a6fbfa8
fix test
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 17:58:50 +01:00
Miek Gieben
4a0a5745bd
Support includes
...
This adds a IncludesHook that returns the byte to be read. Error
handling is completely left to the client. By default when there is no
includehook we return nil for bytes read.
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 17:52:11 +01:00
Miek Gieben
317d4b4b09
better
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 17:16:34 +01:00
Miek Gieben
6f77bf5ca9
Add citationss
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 17:13:36 +01:00
Miek Gieben
864377cdbf
More citations
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 14:27:02 +01:00
Miek Gieben
67d6503d9a
add citations
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 09:23:22 +01:00
Miek Gieben
e790b0d6b8
Merge pull request #32 from mmarkdown/one-flag
...
Unify all Mmark extension under Mmark
2018-08-03 08:54:23 +01:00
Miek Gieben
6a71c2fe43
... and the tests
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 08:48:23 +01:00
Miek Gieben
f83c7119ae
Unify all Mmark extension under Mmark
...
This gets rid of the various Mmark* extension types.
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 08:40:02 +01:00
Miek Gieben
bb07f152b5
Merge pull request #31 from mmarkdown/ref
...
Mmark: corss references
2018-08-03 08:36:24 +01:00
Miek Gieben
a4ae7a10b0
not needed
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 08:21:32 +01:00
Miek Gieben
4128e40d11
correct type
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 08:20:36 +01:00
Miek Gieben
fca7a9e0a6
Mmark: add cross reference syntax
...
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-03 08:19:08 +01:00