-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New `html_attributes()` func. to convert pandoc attributes to PML HTML Attributes by prefixing `html_` to their key. Unfortunately can't be used due PMLC 3.1.0 bug (see: pml-lang/pml-companion#91) * Adapt `Span()` element, but temporarily ignore any HTML attributes due to current PMLC bug. * Implement `SingleQuoted()` and `DoubleQuoted()` by emitting literal curly quotes characters. * Tweak `Link()` and stop escaping the value of `text` attribute, since it would vanquish any inline styles (although it seems that no styles are supported).
- Loading branch information
Showing
9 changed files
with
157 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
pandoc/filters-lua/pml-writer/tests/elements/mark.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: 'Span Test' | ||
subtitle: "Rendering span nodes" | ||
author: Tristano Ajmone | ||
date: 2022-11-03 | ||
... | ||
|
||
|
||
To highlight text, use the `mark` class (via `bracketed_spans` ext.): | ||
|
||
> Some [highlighted text]{.mark} example. | ||
|
||
Or, via the `native_spans` extension, only for HTML output: | ||
|
||
> Some <span class="mark">highlighted text</span> example. | ||
|
||
**References:** | ||
|
||
- [Pandoc Manual » Highlighting](https://pandoc.org/MANUAL.html#highlighting) | ||
- [`bracketed_spans`](https://pandoc.org/MANUAL.html#extension-bracketed_spans) | ||
- [`native_spans`](https://pandoc.org/MANUAL.html#extension-native_spans) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[doc [title Span Test] | ||
[subtitle Rendering span nodes] | ||
|
||
Tristano Ajmone | | ||
2022-11-03 | ||
|
||
|
||
To highlight text, use the [c mark] class (via [c bracketed_spans] ext.): | ||
|
||
[quote | ||
Some [span highlighted text] example. | ||
] | ||
|
||
Or, via the [c native_spans] extension, only for HTML output: | ||
|
||
[quote | ||
Some [span highlighted text] example. | ||
] | ||
|
||
[b References:] | ||
|
||
[list | ||
[el [link url=https://pandoc.org/MANUAL.html#highlighting text="Pandoc Manual » Highlighting"]] | ||
[el [link url=https://pandoc.org/MANUAL.html#extension-bracketed_spans text="[c bracketed_spans]"]] | ||
[el [link url=https://pandoc.org/MANUAL.html#extension-native_spans text="[c native_spans]"]] | ||
] | ||
|
||
|
||
|
||
] |
11 changes: 11 additions & 0 deletions
11
pandoc/filters-lua/pml-writer/tests/elements/quotes.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: 'Curly Quotes Test' | ||
subtitle: "Rendering typographic single- and double-quotes." | ||
author: Tristano Ajmone | ||
date: 2022-11-03 | ||
... | ||
|
||
|
||
'single quoted text' | ||
|
||
"double quoted text" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[doc [title Curly Quotes Test] | ||
[subtitle Rendering typographic single- and double-quotes.] | ||
|
||
Tristano Ajmone | | ||
2022-11-03 | ||
|
||
|
||
‘single quoted text’ | ||
|
||
“double quoted text” | ||
|
||
|
||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: 'Span Test' | ||
subtitle: "Rendering span nodes" | ||
author: Tristano Ajmone | ||
date: 2022-11-03 | ||
... | ||
|
||
This is [spanned text]{.my_class} with class `my_class`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[doc [title Span Test] | ||
[subtitle Rendering span nodes] | ||
|
||
Tristano Ajmone | | ||
2022-11-03 | ||
|
||
|
||
This is [span spanned text] with class [c my_class]. | ||
|
||
|
||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters