Skip to content

Commit 31947e6

Browse files
[flutter_markdown] Import from flutter/flutter_markdown
Imports the flutter/flutter_markdown repository as a package, to consolidate repositories. Part of flutter/flutter#74757
2 parents b891620 + 2903a34 commit 31947e6

183 files changed

Lines changed: 19227 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create an issue to report a bug
4+
title: 'Bug: '
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
Please provide a clear and concise description of the bug.
12+
13+
**How to reproduce**
14+
Steps to reproduce the behavior:
15+
1.
16+
17+
**Expected behavior**
18+
A description of what you expected to happen.
19+
20+
**Screenshots**
21+
If applicable, add screenshots to help explain the problem.
22+
23+
**Additional context**
24+
Add any other context about the problem here.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Use one of the three issue templates provided. The "Other issue"
2+
# template should be used instead of a blank issue.
3+
blank_issues_enabled: false
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an feature enhancement or new functionality
4+
title: 'Feature: '
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of the problem.
12+
13+
**Describe a possible solution.**
14+
Do you have a possible solution or approach you think should be considered?
15+
16+
**Describe possible alternatives.**
17+
Are there possible alternative solutions or features.
18+
19+
**Additional context.**
20+
List any additional context or screenshots about the feature request here.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Other issue
3+
about: Issues that are not bugs or feature requests.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the issue**
11+
Please provide a clear and concise description of the issue.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**IMPORTANT: Please do not create a Pull Request without creating an issue first.**
2+
3+
*Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.*
4+
5+
Please provide enough information so that others can review your pull request:
6+
7+
<!--
8+
Explain the **details** for making this change. What existing problem does the pull request solve? Example: When "Adding a function to do X", explain why it is necessary to have a way to do X.
9+
-->
10+
11+
**Test plan (required)**
12+
13+
<!--
14+
Demonstrate the code is solid. Make sure all automated tests pass. New features or enhancements need an appropriate unit test. If no unit test is required, please explain why. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
15+
-->
16+
17+
**Closing issues**
18+
19+
<!-- If this PR fixes open issues, put `closes #XXXX` in your comment to auto-close the issue. -->
20+
21+
**Additional considerations**
22+
23+
<!-- List any additional information that can help reviewers understand. -->
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: flutter_markdown
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '0 0 * * *' # Every day at midnight
11+
12+
defaults:
13+
run:
14+
shell: bash
15+
16+
jobs:
17+
flutter-tests:
18+
name: Test Flutter ${{ matrix.flutter_version }} on ${{ matrix.os }}
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
flutter_version: [dev, beta] # Disable stable until Null Safety goes stable
24+
os: [ubuntu-latest, macos-latest, windows-latest]
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: actions/setup-java@v1
28+
with:
29+
java-version: '12.x'
30+
- uses: subosito/flutter-action@v1
31+
with:
32+
channel: ${{ matrix.flutter_version }}
33+
- run: flutter analyze
34+
- run: flutter format --dry-run --set-exit-if-changed .
35+
- run: flutter test
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
**/doc/api/
25+
.dart_tool/
26+
.flutter-plugins
27+
.packages
28+
.pub-cache/
29+
.pub/
30+
/build/
31+
32+
# Web related
33+
lib/generated_plugin_registrant.dart
34+
35+
# Exceptions to above rules.
36+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "flutter_markdown",
9+
"request": "launch",
10+
"type": "dart"
11+
},
12+
{
13+
"name": "example",
14+
"cwd": "example",
15+
"request": "launch",
16+
"type": "dart"
17+
}
18+
]
19+
}
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
## 0.6.1
2+
3+
* Added builder option bulletBuilder
4+
5+
## 0.6.0
6+
7+
* Null safety release
8+
* Added stylesheet option listBulletPadding
9+
* Fixed blockquote inline styling
10+
* Added onTapText handler for selectable text
11+
12+
## 0.6.0-nullsafety.2
13+
14+
* Dependencies updated for null safety
15+
16+
## 0.6.0-nullsafety.1
17+
18+
* Fix null safety on web
19+
* Image test mocks fixed for null safety
20+
21+
## 0.6.0-nullsafety.0
22+
23+
* Initial null safety migration.
24+
25+
## 0.5.2
26+
27+
* Added `MarkdownListItemCrossAxisAlignment` to allow for intrinsic height
28+
measurements of lists.
29+
30+
## 0.5.1
31+
32+
* Fix user defined builders
33+
34+
## 0.5.0
35+
36+
* BREAKING CHANGE: `MarkdownTapLinkCallback` now has three parameters, not one, exposing more
37+
information about a tapped link.
38+
* Note for upgraders, the old single parameter `href` is now the second parameter to match the specification.
39+
* Android example upgraded
40+
* Test coverage updated to match GitHub Flavoured Markdown and CommonMark
41+
* Handle links with empty descriptions
42+
* Handle empty rows in tables
43+
44+
## 0.4.4
45+
46+
* Fix handling of newline character in blockquote
47+
* Add new example demo
48+
* Use the start attribute in ordered list to set the first number
49+
* Revert changes made in PR #235 (which broke newline handling)
50+
51+
## 0.4.3
52+
53+
* Fix merging of `MarkdownStyleSheets`
54+
* Fix `MarkdownStyleSheet` textScaleFactor to use default value of 1.0, if not provided, instead using the textScaleFactor of the nearest MediaQuery
55+
56+
## 0.4.2
57+
58+
* Fix parsing of image caption & alt attributes
59+
* Fix baseline alignment in lists
60+
* Support `LineBreakSyntax`
61+
62+
## 0.4.1
63+
64+
* Downgrade Flutter minimum from 1.17.1 to 1.17.0 for Pub
65+
66+
## 0.4.0
67+
68+
* Updated for Flutter 1.17
69+
* Ignore newlines in paragraphs
70+
* Improve handling of horizontal rules
71+
72+
## 0.3.5
73+
74+
* Fix hardcoded colors and improve Darktheme
75+
* Fix text alignment when formatting is involved
76+
77+
## 0.3.4
78+
79+
* Add support for text paragraphs and blockquotes.
80+
81+
## 0.3.3
82+
83+
* Add the ability to control the scroll position of the `MarkdownWidget`.
84+
85+
## 0.3.2
86+
87+
* Uplift `package:markdown` dependency version to enable deleting HTML unescape URI workaround
88+
* Explictly state that Flutter 1.10.7 is the minimum supported Flutter version in the library `pubspec.yaml`.
89+
90+
## 0.3.1
91+
92+
* Expose `tableColumnWidth`
93+
* Add `MarkdownStyleSheet.fromCupertinoTheme`
94+
* Fix `MarkdownStyleSheet.blockquote`
95+
* Flutter for web support
96+
* Add physic and shrinkWrap to Markdown widget
97+
* Add MarkdownBody.fitContent
98+
* Support select text to copy
99+
* Fix list bullet alignment
100+
* HTML unescape URIs (temporary workaround for [dart-lang/markdown #272](https://github.com/dart-lang/markdown/issues/272))
101+
* Rebuilt `example/android` and `example/ios` directories
102+
103+
**Note:** this version has an implicit minimum supported version of Flutter 1.10.7.
104+
See [flutter/flutter_markdown issue #156](https://github.com/flutter/flutter_markdown/issues/156) for more detail.
105+
106+
## 0.3.0
107+
108+
* Support GitHub flavoured Markdown
109+
* Support strikethrough
110+
* Convert TextSpan to use new InlineSpan API
111+
112+
## 0.2.0
113+
114+
* Updated environment sdk constraints to make the package
115+
Dart 2 compatible. As a result, usage of this version and higher
116+
requires a Dart 2 SDK.
117+
118+
## 0.1.6
119+
120+
* Updated `markdown` dependency.
121+
122+
## 0.1.5
123+
124+
* Add `mockito` as a dev dependency. Eliminate use of `package:http`, which
125+
is no longer part of Flutter.
126+
127+
## 0.1.4
128+
129+
* Add `li` style to bullets
130+
131+
## 0.1.3
132+
133+
* Add `path` and `http` as declared dependencies in `pubspec.yaml`
134+
135+
## 0.1.2
136+
137+
* Add support for horizontal rules.
138+
* Fix the `onTap` callback on images nested in hyperlinks
139+
140+
## 0.1.1
141+
142+
* Add support for local file paths in image links. Make sure to set the
143+
`imageDirectory` property to specify the base directory containing the image
144+
files.
145+
146+
## 0.1.0
147+
148+
* Roll the dependency on `markdown` to 1.0.0
149+
* Add a test and example for image links
150+
* Fix the `onTap` callback on hyperlinks
151+
152+
## 0.0.9
153+
154+
* First published version

‎packages/flutter_markdown/LICENSE‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright 2017 Google, Inc. All rights reserved.
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions are
5+
// met:
6+
//
7+
// * Redistributions of source code must retain the above copyright
8+
// notice, this list of conditions and the following disclaimer.
9+
// * Redistributions in binary form must reproduce the above
10+
// copyright notice, this list of conditions and the following disclaimer
11+
// in the documentation and/or other materials provided with the
12+
// distribution.
13+
// * Neither the name of Google Inc. nor the names of its
14+
// contributors may be used to endorse or promote products derived from
15+
// this software without specific prior written permission.
16+
//
17+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)