Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.3.0 release #87

Merged
merged 20 commits into from
May 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dictionary
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ HeaderAnchor
HeaderAnchor's
highlighter's
html
IE8
inline
Inline
InlineHilite
Expand All @@ -56,6 +55,7 @@ KBD
kbd
LaTeX
Limberg
linkafies
linter
MagicLink
MathJax
Expand Down Expand Up @@ -115,6 +115,7 @@ sublicense
SuperFences
SVG
SVGs
syntaxes
Tasklist
th
thumbsup
Expand Down
60 changes: 40 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,49 @@ sudo: false
language: python
matrix:
include:
- python: 2.7
env: TOXENV=py27-unittests
- python: 3.3
env: TOXENV=py33-unittests
- python: 3.4
env: TOXENV=py34-unittests
- python: 3.5
env: TOXENV=py35-unittests
- python: 3.6
env: TOXENV=py36-unittests
- python: 2.7
env: TOXENV=lint
- python: 2.7
env: TOXENV=spelling
- python: 2.7
env: TOXENV=py27-unittests
- python: 3.3
env: TOXENV=py33-unittests
- python: 3.4
env: TOXENV=py34-unittests
- python: 3.5
env: TOXENV=py35-unittests
- python: 3.6
env: TOXENV=py36-unittests
- python: 2.7
env: TOXENV=lint
- python: 2.7
env: TOXENV=documents
addons:
apt:
packages:
- aspell
- aspell-en
- aspell
- aspell-en
install:
- pip install tox
- pip install codecov
- pip install tox
- pip install codecov
script:
- tox
- tox
after_success:
- codecov
- codecov
deploy:
- provider: pypi
user: facelessuser
password:
secure: S/7VvUM4b8dViV5YtOJOE3+w8u/n0nV3b3nyYzcgdetxYp9ppUq7wRZEwWRXGkLH7LPHxprq8n7EGHBVpfDHbesUqj+m93OPVNBlNy8Uh3p6bUlaI0f8MW2zAPq04oOHZ0mbWuDe34aHW3IEoCFCFL5gUAgx7cBIjcHPFFyTPsHnQGAVf/cLHfEE+OtJgUeFLgdBKehbcN9P7W96o8TMrJL6bQObytzzLUFN0LfkqBmqnZH+7g1Hlxw3k9ajSC2edLjCDmuEQy+NYsVrW6/XB9vzNzYA1/JREdP+6IEQ+V4temRzgVWNgWjrl83Du+c73Cc/DkVPoOw/udAHqFk/nNYQCZJbzZnuQxqrp/MDKZxmJzmspDX7PCQV3Mw0pxYTbE/3bWSVVPfwi2VCbaOkELndHBOCBXK0U12exlg9vidJA+18M5TkiNIBCjkWAI9uUeLxfQcW9q7hWeiKgbD2VJPpp4V4TjtTAAMEIyq2Eie2uoreKL07Q82QcKKqudKZWaUl++nh/ZNo5u8X0K2YZQWOD9iKrsCOgpov8Bh9Kz57QpBTDgx6l1NTovmbQ4v1vFgGZVx4MnhpQgIqzHU+5Bb8E/ar0FtsCEfG0m5yLwKA0SOrX8vSAlTu8w3yN+Q/pbbetVsvMR3pCeh8bu+s742wS6Llx5RxALi8nJygm6k=
distributions: "sdist bdist_wheel"
on:
tags: true
repo: facelessuser/pymdown-extensions
condition: "$TOXENV = documents"
- provider: pages
github_token: $GITHUB_TOKEN
name: $GITHUB_USER
email: $GITHUB_EMAIL
skip_cleanup: true
local_dir: site
on:
tags: true
repo: facelessuser/pymdown-extensions
condition: "$TOXENV = documents"
38 changes: 26 additions & 12 deletions docs/src/js/uml.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* @return {void}
*/
export default (converter, className, settings) => {
// Change article to whatever element your main Markdown content lives.
const article = document.querySelectorAll("article")
const blocks = document.querySelectorAll(`pre.${className},div.${className}`)

// Is there a settings object?
Expand All @@ -15,11 +17,15 @@ export default (converter, className, settings) => {
for (let i = 0; i < blocks.length; i++) {
const block = blocks[i]
let text = null
let el = null
const parentEl = block
const el = document.createElement("div")
el.className = className
el.style.visibility = "hidden"
el.style.position = "absolute"

if (block.tagName.toLowerCase() === "pre") {
// Handles <pre><code>
const childEl = block.firstChild
const parentEl = childEl.parentNode
text = ""
for (let j = 0; j < childEl.childNodes.length; j++) {
const child = childEl.childNodes[j]
Expand All @@ -29,22 +35,30 @@ export default (converter, className, settings) => {
break
}
}
// Do UML conversion and replace source
el = document.createElement("div")
el.className = className
parentEl.parentNode.insertBefore(el, parentEl)
parentEl.parentNode.removeChild(parentEl)
} else {
// Handles <div>
el = block
text = el.textContent || el.innerText
if (el.innerText){
el.innerText = ""
text = parentEl.textContent || parentEl.innerText
if (parentEl.innerText){
parentEl.innerText = ""
} else {
el.textContent = ""
parentEl.textContent = ""
}
}

// Insert our new div at the end of our content to get general
// typset and page sizes as our parent might be `display:none`
// keeping us from getting the right sizes for our SVG.
// Our new div will be hidden via "visibility" and take no space
// via `poistion: absolute`. When we are all done, use the
// original node as a reference to insert our SVG back
// into the proper place, and then make our SVG visilbe again.
// Lastly, clean up the old node.
article[0].appendChild(el)
const diagram = converter.parse(text)
diagram.drawSVG(el, config)
el.style.visibility = "visible"
el.style.position = "static"
parentEl.parentNode.insertBefore(el, parentEl)
parentEl.parentNode.removeChild(parentEl)
}
}
39 changes: 23 additions & 16 deletions docs/src/markdown/changelog.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# Changelog

## 3.3.0

Released May 26, 2017

- **NEW**: Added support for pull request link shortening in MagicLink (https://github.com/facelessuser/pymdown-extensions/pull/88).
- **NEW**: Added new Spoilers extension (https://github.com/facelessuser/pymdown-extensions/issues/85).

## 3.2.1

> Released May 23, 2017
Released May 23, 2017

- **FIX**: Cannot set Highlight's CSS class.

## 3.2.0

> Released May 15, 2017
Released May 15, 2017

- **NEW**: Add support for Twemoji 2.3.5.
- **NEW**: Update to EmojiOne 3.0.2.
Expand All @@ -17,14 +24,14 @@

## 3.1.0

> Released May 7, 2017
Released May 7, 2017

- **NEW**: Highlight extension now runs normal indented code blocks through highlighter.
- **FIX**: When Pygments is disabled, `linenums` class was attached to code blocks even if `linenums` was disabled and not enabled via fence headers.

## 3.0.0

> Released Apr 16, 2017
Released Apr 16, 2017

- **NEW**: Added Keys extension.
- **NEW**: Generalized custom fences (https://github.com/facelessuser/pymdown-extensions/issues/60). `flow` and `sequence` fence are now just custom fences and can be disabled simply by overwriting the `custom_fences` setting.
Expand All @@ -39,15 +46,15 @@

## 2.0.0

> Released Feb 12, 2017
Released Feb 12, 2017

- **NEW**: SuperFences and InlineHilite can be configured via the new Highlight extension.
- **NEW**: InlineHilite now has all highlighting features pushed to the Highlight extension. This removes all the CodeHilite code that used to be in it and instead relocates it to Highlight.
- **NEW**: Deprecate the nesting option in SuperFences. Nesting is default and the only acceptable behavior moving forward. The ability to turn off nesting will be removed in 3.0.

## 1.8.0

> Released Jan 27, 2017
Released Jan 27, 2017

- **NEW**: MagicLink special repository link shortener for GitHub, GitLab, and Bitbucket (https://github.com/facelessuser/pymdown-extensions/issues/49).
- **FIX**: GitHub asterisk emphasis should never have had smart enabled for it (https://github.com/facelessuser/pymdown-extensions/issues/50).
Expand All @@ -59,7 +66,7 @@

## 1.7.0

> Released Jan 21, 2017
Released Jan 21, 2017

- **NEW**: Arithmatex now supports `\(...\)`, `\[...\]`, and `\begin{}...\end{}`.
- **NEW**: Arithmatex has an option to embed the math code in MathJax script tags.
Expand All @@ -71,21 +78,21 @@

## 1.6.1

> Released Jan 16, 2017
Released Jan 16, 2017

- **FIX**: Don't install tools or tests folder when installing from Pypi.

## 1.6.0

> Released Jan 15, 2017
Released Jan 15, 2017

- **NEW**: EscapeAll has the option to perform more like Pandoc in that you can enable escaped newlines to be `hardbreaks`, and escaped spaces to be `nbsp`.
- **NEW**: Rework poorly thought out snippets format to require quoting file names with single line format. Add a block format. Allow commenting out lines temporarily. And allow a way to escape them by placing a space after them.
- **FIX**: Fix documentation issues.

## 1.5.0

> Released Jan 13, 2017
Released Jan 13, 2017

- **NEW**: New EscapeAll extension.
- **NEW**: New Snippets extension for including external files into a Markdown file.
Expand All @@ -100,7 +107,7 @@

## 1.4.0

> Released Jan 5, 2017
Released Jan 5, 2017

- **NEW**: HeaderAnchor extension is now deprecated. It will be removed in a future version.
- **NEW**: HeaderAnchor is no longer included in the `pymdownx.github` extension.
Expand All @@ -109,7 +116,7 @@

## 1.3.0

> Released Jan 1, 2017
Released Jan 1, 2017

- **NEW**: New Emoji extension that aims to replace GitHubEmoji. By default it is configured for EmojiOne and Gemoji (GitHub's emoji).
- **NEW**: GitHubEmoji is deprecated. Please use the Emoji extension instead.
Expand All @@ -118,26 +125,26 @@

## 1.2.0

> Released Nov 1, 2016
Released Nov 1, 2016

- **NEW**: Add option to output task lists in a more customizable way.

## 1.1.0

> Released Mar 1, 2016
Released Mar 1, 2016

- **NEW**: Add pypi 3.5 info in setup
- **NEW**: Add option to MagicLink extension to allow the stripping of link protocols (`http://` etc.).
- **NEW**: Add option to `github` extension to disable the use of `nl2br` to reflect recent changes to GitHub Flavored Markdown. Currently the default is the legacy (uses `nl2br`), but a warning will be displayed. In the future, the option will be defaulted to not use `nl2br`.

## 1.0.1

> Released Dec 10, 2015
Released Dec 10, 2015

- **FIX**: Ordinal number 11th, 12th, and 13th

## 1.0.0

> Released Dec 8, 2015
Released Dec 8, 2015

- **NEW**: Initial release.
Loading